Check current status before rearrangement.
[oracle@primary01 ~]$ sqlplus / as sysasm
...
SQL> column diskgroup format a10;
SQL> column disk_name format a10;
SQL> column failgroup format a10;
SQL> column path format a12;
SQL> select dg.name diskgroup, dk.path, dk.name disk_name, dk.failgroup, dk.mount_status, dk.mode_status from v$asm_disk dk, v$asm_diskgroup dg where dk.group_number = dg.group_number;
DISKGROUP PATH DISK_NAME FAILGROUP MOUNT_S MODE_ST
---------- ------------ ---------- ---------- ------- -------
DATA ORCL:DISK01 DISK01 DISK01 CACHED ONLINE
DATA ORCL:DISK02 DISK02 DISK02 CACHED ONLINE
DATA ORCL:DISK03 DISK03 DISK03 CACHED ONLINE
DATA ORCL:DISK04 DISK04 DISK04 CACHED ONLINE
DATA ORCL:DISK05 DISK05 DISK05 CACHED ONLINE
DATA ORCL:DISK06 DISK06 DISK06 CACHED ONLINE
DATA ORCL:DISK07 DISK07 DISK07 CACHED ONLINE
DATA ORCL:DISK08 DISK08 DISK08 CACHED ONLINE
8 rows selected.
SQL> select name disk_name, path, mount_status, mode_status, state from v$asm_disk;
DISK_NAME PATH MOUNT_S MODE_ST STATE
---------- ------------ ------- ------- --------
DISK01 ORCL:DISK01 CACHED ONLINE NORMAL
DISK02 ORCL:DISK02 CACHED ONLINE NORMAL
DISK03 ORCL:DISK03 CACHED ONLINE NORMAL
DISK04 ORCL:DISK04 CACHED ONLINE NORMAL
DISK05 ORCL:DISK05 CACHED ONLINE NORMAL
DISK06 ORCL:DISK06 CACHED ONLINE NORMAL
DISK07 ORCL:DISK07 CACHED ONLINE NORMAL
DISK08 ORCL:DISK08 CACHED ONLINE NORMAL
8 rows selected.
Each disk has its own failure group as its name.
Dropping and adding disks repeatedly, in this case, the failure groups are FG1, FG2, FG3 and FG4.
SQL> alter diskgroup data drop disk disk01, disk02 rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data add failgroup fg1 disk 'ORCL:DISK01', 'ORCL:DISK02' rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data drop disk disk03, disk04 rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data add failgroup fg2 disk 'ORCL:DISK03', 'ORCL:DISK04' rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data drop disk disk05, disk06 rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data add failgroup fg3 disk 'ORCL:DISK05', 'ORCL:DISK06' rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data drop disk disk07, disk08 rebalance power 1 wait;
Diskgroup altered.
SQL> alter diskgroup data add failgroup fg4 disk 'ORCL:DISK07', 'ORCL:DISK08' rebalance power 1 wait;
Diskgroup altered.
Let's check the result of rearrangement.
SQL> select dg.name diskgroup, dk.path, dk.name disk_name, dk.failgroup, dk.mount_status, dk.mode_status from v$asm_disk dk, v$asm_diskgroup dg where dk.group_number = dg.group_number;
DISKGROUP PATH DISK_NAME FAILGROUP MOUNT_S MODE_ST
---------- ------------ ---------- ---------- ------- -------
DATA ORCL:DISK01 DISK01 FG1 CACHED ONLINE
DATA ORCL:DISK02 DISK02 FG1 CACHED ONLINE
DATA ORCL:DISK03 DISK03 FG2 CACHED ONLINE
DATA ORCL:DISK04 DISK04 FG2 CACHED ONLINE
DATA ORCL:DISK05 DISK05 FG3 CACHED ONLINE
DATA ORCL:DISK06 DISK06 FG3 CACHED ONLINE
DATA ORCL:DISK07 DISK07 FG4 CACHED ONLINE
DATA ORCL:DISK08 DISK08 FG4 CACHED ONLINE
8 rows selected.
SQL> select name disk_name, path, mount_status, mode_status, state from v$asm_disk;
DISK_NAME PATH MOUNT_S MODE_ST STATE
---------- ------------ ------- ------- --------
DISK01 ORCL:DISK01 CACHED ONLINE NORMAL
DISK02 ORCL:DISK02 CACHED ONLINE NORMAL
DISK03 ORCL:DISK03 CACHED ONLINE NORMAL
DISK04 ORCL:DISK04 CACHED ONLINE NORMAL
DISK05 ORCL:DISK05 CACHED ONLINE NORMAL
DISK06 ORCL:DISK06 CACHED ONLINE NORMAL
DISK07 ORCL:DISK07 CACHED ONLINE NORMAL
DISK08 ORCL:DISK08 CACHED ONLINE NORMAL
8 rows selected.