Convert a baseline ASMFD disk group to a CTE guarded ASMFD disk group using the Offline method
We will use the following example scenario in this section:
Objective:
-
Convert the baseline ASMFD disk group DATA1, to a CTE guarded ASMFD disk group.
-
Current configured baseline DATA1 disk group consists of ASMFD disk DISK1 on a raw partitioned device
/dev/sdc1
.
To convert:
-
If the targeted raw disk partition to be guarded does not yet exist, create it. For example:
/dev/sdd1
.Note
The capacity of
/dev/sdd1
must be large enough to transfer all of the data from ASMFD disk DISK1 on/dev/sdc1
. -
Using CTE, guard the raw partitioned device.
-
Create an ASMFD disk on the guarded raw partition:
$GRID_HOME/bin asmcmd afd_label'<disk_label>' '<guardedRawPartition>
Example
$GRID_HOME/bin asmcmd afd_label 'DISK2' '/dev/secvm/dev/sdd1'
-
Ensure that there are current backups of all of the database(s) residing on the ASMFD disk group DATA.
-
Shutdown all databases residing on ASMFD disk group DATA1.
-
In the ASM database, run the following SQL command with the rebalance option to add a guarded ASMFD disk DISK2 to ASMFD disk group DATA1, type:
ALTER DISKGROUP <ASMFD diskgroup name> ADD DISK 'AFD:<ASMFD disk name>' REBALANCE POWER 11 WAIT;
Example
ALTER DISKGROUP DATA1 ADD DISK 'AFD:DISK2' REBALANCE POWER 11 WAIT;
-
Verify the results, type:
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
-
Run the following SQL command, in the ASM database, to transfer all data from ASMFD disk DISK1 to ASMFD disk DISK 2 and then drop ASMFD disk DISK1 from ASMFD disk group DATA1, type:
ALTER DISKGROUP
DROP DISK 'AFD: REBALANCE POWER WAIT; Example:
ALTER DISKGROUP DATA1 DROP DISK 'AFD:DISK1' REBALANCE POWER 11 WAIT;
Verify the results:
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 where 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
At this point, all data in the ASMFD disk group DATA1 has been transferred from the baseline ASMFD disk DISK1, to the guarded ASMFD disk DISK2. At this time, the databases that are residing in ASMFD disk group DATA1 can now be restarted.