This blog identifies the DBA steps required to migrate
databases from one disk array to another.
Identify the ASM diskgroups and their disk (LUN) sizes
Login to the ASM instance and identify the LUNs allocated to
server.
SQL> SET PAGES
999
SQL> col name
format a15
For 11g ASM:
SQL> select
d.group_number, g.name, d.os_mb
from
v$asm_disk d left outer join v$asm_diskgroup g
on
(d.group_number = g.group_number)
order
by g.group_number, d.os_mb;
For 10g ASM:
SQL> select
d.group_number, g.name, d.total_mb
from
v$asm_disk d left outer join v$asm_diskgroup g
on
(d.group_number = g.group_number)
order
by g.group_number, d.total_mb;
You may discard LUNs with group number 0, as they are not
part of any diskgroup. Request Sysadmin team to provision the new LUNs to the
container, same LUN size or total of multiple LUNs in the group is equal or
more to what is allocated to the group.
To find out what is allocated and free in each diskgroup, you may use:
SQL> select name,
total_mb, free_mb from v$asm_diskgroup;
Once LUNs are provisioned by Unix team, use OEM or SQL to
add the LUNs to respective diskgroups [existing diskgroup]. NO outage required
for this step. Remember to login to 11g ASM using the SYSASM privilege, for 10g
login using SYSDBA privilege.
SQL> ALTER
DISKGROUP ADD DISK ‘/full_path_of_device’;
To find out which LUNs are available to add, you may use
SQL:
SQL> col path
format a40
SQL> select
path, os_mb from v$asm_disk where group_number = 0;
{for 10g ASM, please substitute os_mb with total_mb}
Then, go ahead and drop the old LUNs. No need to wait for
the add operation to complete.
SQL> ALTER
DISKGROUP DROP DISK name_of_old_LUN;
The name of the LUN can be found by querying the V$ASM_DISK...
SQL> select path,name from v$asm_disk where group_number=3;
Keep the rebalance power low, so that the migration activity does not impact database performance.
SQL> select path,name from v$asm_disk where group_number=3;
Keep the rebalance power low, so that the migration activity does not impact database performance.
You may check the progress of rebalance periodically using V$ASM_OPERATION,
once no rows are in this view, you may advice SYSADMIN team to pull out the old
LUNs from the server. V$ASM_OPERATION also shows the work so far completed
and how long it will take to complete the work.