How to add disk to ASM diskgroup with two-way mirroring

Learn how to add disk to ASM diskgroup with two-way mirroring and how to specify a failgroup in this tip from Oracle expert Brian Peasland.

I have a question regarding ASM. Our 2 node RAC database's ASM disk group is getting full. We need to add a disk to the disk group "DATADG", which is in Normal redundancy, which means two-way mirroring. Now, if we want to add a disk to disk group DATADG does that mean we should add two disks, so that the data will be mirrored?

Disk GroupName SectorSize BlockSize AllocationUnit Size State Type Total Size (MB) Used Size (MB) Pct. Used
DATADG 1,024 4,096 1,048,576 CONNECTED NORMAL 1,048,576 862,114 82.22
FLASHDG 1,024 4,096 1,048,576 CONNECTED NORMAL 262,144 60,814 23.20

Disk Group Name Path File Name Fail Group File Size (MB) Used Size (MB) Pct. Used
DATADG /dev/rdisk/data1a DATADG_0000 524,288 524,288 100.00

DATADG /dev/rdisk/data1b DATADG_0002 524,288 524,288 100.00


GROUP_NUMBER DISK_NUMBER NAME File Size (MB) COMPOUND_INDEX INCARNATION MOUNT_S HEADER_STATUS MODE_ST STATE REDUNDA PATH

1 0 DATADG_0000 524,288 16777216 4042279707 OPENED UNKNOWN ONLINE NORMAL UNKNOWN /dev/rdisk/data1a

1 2 DATADG_0002 524,288 16777218 4042279704 OPENED UNKNOWN ONLINE NORMAL UNKNOWN /dev/rdisk/data1b

Fom Sqlplus
select group_number,disk_number,name,failgroup from v$asm_disk;

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP
1 0 DATADG_0000
1 2 DATADG_0002
2 0 FLASHDG_0000
2 1 FLASHDG_0001

No disk is under any failgroup, means "every disk its own failure group." But, From Enterprise Manager view"

Disk -- FailureGroup-- Path -- Read/WriteErrors-- State -- Size(GB)-- Used(GB)-- Used(%)
DATADG_0000-- DATAFG1-- /dev/rdisk/data1a -- 0-- NORMAL-- 512.00-- 420.95-- 82.22
DATADG_0002--DATAFG2 -- /dev/rdisk/data1b -- 0-- NORMAL-- 512.00-- 420.95-- 82.22

The disks are under the FailureGroup "DATAFG1" and "DATAFG2" respectively. The two disks in the disk group DATADG are mirrored. Now if we are willing to add a new disk then should we add two disks in existing failure groups, so that the new disk will be mirrored?

alter diskgroup DATADG add
failgroup DATAFG1 disk '/dev/rdisk/data2a' name DATADG_0003
failgroup DATAFG2 '/dev/rdisk/data2b' name DATADG_0004;

Is the above command correct? Or will it work just adding the two disks after shutting down the database instance, without specifying the FailureGroup? What is the meaning of the disk in its own failgroup?

If you add disk to a mirrored disk group, then you should add disk in pairs. If you add an odd number of disks to the disk group, the data cannot be mirrored. Your command to add the disk to the diskgroup looks correct to me. You specified the failure group for each disk to be added. If you did not specify the failure group, the disk would be added to their own failure groups.

Dig Deeper on Oracle database administration