Convert a baseline ASMFD disk group to a CTE guarded ASMFD disk group using the Online method
We will use the following example scenario in this section:
-
Number of RAC nodes: 2
-
Name of Diskgroup: DATA1
-
Number of disks: 3
Name of baseline disks assigned to raw device:
-
DISK1: /dev/sdb1
-
DISK2: /dev/sdc1
-
DISK3: /dev/sdd1
-
ASMFD disk group DATA1 was created from baseline ASMFD disks DISK1, DISK2, and DISK3.
DG_NAME DG_STATE TYPE DSK_NO PATH MOUNT_S FAILGROUP STATE
--------------- ---------- ------ ---------- --------------- ------- ---------- --------
DATA1 MOUNTED EXTERN 0 AFD:DISK1 CACHED DISK1 NORMAL
DATA1 MOUNTED EXTERN 0 AFD:DISK2 CACHED DISK2 NORMAL
DATA1 MOUNTED EXTERN 0 AFD:DISK3 CACHED DISK3 NORMAL
Objective:
- Convert all of the database data on ASMFD disk group DATA1 from baseline to a CTE guarded ASMFD disk group.
The combined capacity of /dev/sdc1
on DISK2 and /dev/sdd1
on DISK3 must be large enough to hold all of the data transferring from ASMFD disk DISK1 on /dev/sdb1
.
To convert:
From RAC Node 1:
-
Connect locally, as the system administrator, to an Oracle ASM instance using OS authentication, type:
sqlplus 'as sysasm'
-
At the ASM prompt, drop the ASMFD disk DATA1 from the disk group DISK1, type:
ALTER DISKGROUP DATA1 DROP DISK DISK1 REBALANCE POWER 11 WAIT;
-
Verify that the ASMFD DISK2 is no longer part of the ASMFD disk group DATA1, type:
sqlplus '/as sysasm' col PATH for a15 col DG_NAME for a15 col DG_STATE for a10 col FAILGROUP for a10 select dg.name dg_name, dg.state dg_state, dg.type, d.disk_number dsk_no,d.path, d.mount_status, d.FAILGROUP, d.state from v$asm_diskgroup dg, v$asm_disk d where dg.group_number=d.group_number and dg.name = 'DATA1';
System Response
DG_NAME DG_STATE TYPE DSK_NO PATH MOUNT_S FAILGROUP STATE --------------- ---------- ------ ---------- --------------- ------- ---------- -------- DATA1 MOUNTED EXTERN 0 AFD:DISK2 CACHED DISK2 NORMAL DATA1 MOUNTED EXTERN 0 AFD:DISK3 CACHED DISK3 NORMAL
Depending on the size of your data, DISK1 might take some time to no longer show in the above query.
-
From the OS command prompt, drop ASMFD disk DISK1:
$GRID_HOME/bin asmcmd afd_unlabel DISK1
-
From the command prompt, verify DISK1 is no longer visible on both RAC Node 1 and 2.
$GRID_HOME/bin asmcmd afd_lslbl
-
Using CTE, guard the DISK1 raw partitioned device
/dev/sdb1
. -
From the command prompt, recreate ASMFD disk DISK1, with the guarded raw device
/dev/sdb1
.$GRID_HOME/bin asmcmd afd_label 'DISK1' '/dev/secvm/dev/sdb1'
$GRID_HOME/bin asmcmd afd_label 'DISK1' '/dev/secvmsdb1'
-
From the command prompt, verify that DISK1 is now visible on both RAC Node 1 and 2 with the newly guarded path:
$GRID_HOME/bin asmcmd afd_lslbl
-
From the ASM prompt, add the guarded ASMFD disk DISK1 back to the ASMFD disk group DATA1, type:
sqlplus 'as sysasm' ALTER DISKGROUP DATA1 ADD DISK 'AFD:DISK1' REBALANCE POWER 11 WAIT;
-
Verify that ASMFD disk DISK1 is now part of ASMFD diskgroup DATA1, type:
sqlplus '/as sysasm' col PATH for a15 col DG_NAME for a15 col DG_STATE for a10 col FAILGROUP for a10 select dg.name dg_name, dg.state dg_state, dg.type, d.disk_number dsk_no,d.path, d.mount_status, d.FAILGROUP, d.state from v$asm_diskgroup dg, v$asm_disk d where dg.group_number=d.group_number and dg.name = 'DATA1';
System Response
DG_NAME DG_STATE TYPE DSK_NO PATH MOUNT_S FAILGROUP STATE --------------- ---------- ------ ---------- --------------- ------- ---------- -------- DATA1 MOUNTED EXTERN 0 AFD:DISK1 CACHED DISK1 NORMAL DATA1 MOUNTED EXTERN 0 AFD:DISK2 CACHED DISK2 NORMAL DATA1 MOUNTED EXTERN 0 AFD:DISK3 CACHED DISK3 NORMAL
Depending on the size of your data, DISK1 might take some time to display in the above query.
-
Repeat the previous steps for Baseline DISK 2 and DISK 3