If an ASM disk becomes offline and cannot be repaired, administrators require the ability to replace the disk.
In prior versions of ASM, there was no replace command. Rather, administrators had to drop the faulty disk and then add a new one back into the disk group.
So,ASM level rebalance will takes place .Depending on multiple internal and external factor,reblance is time consuming.
In 12c ASM allows DBAs to simply replace an offline disk using one fast and efficient operation. There is no need for any additional reorganization or rebalancing across the rest of the disk group.
We now have a new ALTER DISKGROUP REPLACE DISK command, that is a mix of the rebalance and fast mirror resync functionality. Instead of a full rebalance, the new, replacement disk, is populated with data read from the surviving partner disks only. This effectively reduces the time to replace a failed disk.
Note that the disk being replaced must be in OFFLINE state. If the disk offline timer has expired, the disk is dropped, which initiates the rebalance. On a disk add, there will be another rebalance.
Few factors
> ASM diskgroup level attribute compatible.asm should be of 12.1.0.0 for this feature
> Replacing disk should bad in true sense , ASM will not replace online disk.
> The replacement disk takes the same name as the original disk and becomes part of the same failure group as the original disk.
> Then replacing good disk should be sized equal or greater than replacing bad disk.Else replace will fail.
SQL> select name,path,total_mb from v$asm_disk where group_number=4; NAME PATH TOTAL_MB FAILGROUP_0003 /dev/sdi1 2541 FAILGROUP_0001 /dev/sdh2 2565 FAILGROUP_0002 /dev/sdb4 2165 FAILGROUP_0000 /dev/sde2 2565 SQL> !chmod 000 /dev/sdb4 SQL> alter diskgroup FAILGROUP replace disk FAILGROUP_0002 with '/dev/sdg1'; Diskgroup altered. # the disk partition /dev/sdg1 is actually more than 2165 mb, ## From alert log file , Tue Nov 07 13:29:34 2013 GMON updating disk modes for group 4 at 39 for pid 42, osid 8783 NOTE: group FAILGROUP: updated PST location: disk 0000 (PST copy 0) NOTE: group FAILGROUP: updated PST location: disk 0003 (PST copy 1) Tue Nov 07 13:29:34 2013 NOTE: PST update grp = 4 completed successfully NOTE: initiating PST update: grp 4 (FAILGROUP), dsk = 2/0x0, mask = 0x7d, op = assign Tue Nov 07 13:29:34 2013 GMON updating disk modes for group 4 at 40 for pid 42, osid 8783 NOTE: group FAILGROUP: updated PST location: disk 0000 (PST copy 0) NOTE: group FAILGROUP: updated PST location: disk 0003 (PST copy 1) Tue Nov 07 13:29:34 2013 NOTE: PST update grp = 4 completed successfully Tue Nov 07 13:29:34 2013 NOTE: Voting File refresh pending for group 4/0x60869f8 (FAILGROUP) NOTE: Attempting voting file refresh on diskgroup FAILGROUP Tue Nov 07 13:29:34 2013 SUCCESS: alter diskgroup FAILGROUP replace disk FAILGROUP_0002 with '/dev/sdg1' Tue Nov 07 13:29:34 2013 NOTE: starting rebalance of group 4/0x60869f8 (FAILGROUP) at power 1 Starting background process ARB0 ## Validated that replacing disk is taking same name as old disk SQL> select name,path,total_mb from v$asm_disk where group_number=4; NAME PATH TOTAL_MB FAILGROUP_0003 /dev/sdi1 2541 FAILGROUP_0001 /dev/sdh2 2565 FAILGROUP_0002 /dev/sdg1 2165 << the size showing 2165 only as of failed disk size>> FAILGROUP_0000 /dev/sde2 2565
Important Note: you cannot replace the disk that is smaller than failed disk size, if so you will face the followign issue.
ERROR at line 1: ORA-15032: not all alterations performed ORA-15408: Replacement disk for 'FAILGROUP_0002' must be at least 2541 M.
Very nice presentation