Prior to 12c the ASM metadata is stored in the disk header under allocation unit 0 AU0, if this unit is got corrupted in the disk the whole disk is not usable.
Since version 11.1.0.7, ASM keeps a copy of the disk header in the second last block of AU1. Interestingly, in version 12.1, ASM still keeps the copy of the disk header in AU1, which means that now every ASM disk will have three copies of the disk header block.
Starting 12c, the allocation unit AU0 is replicated to AU11 (Allocation unit 11) under same disk to ensure a copy of the metadata. (Ofcourse a disk failure cannot overcome this).
So you have metadata copy of disk in three allocation unit AU0, AU1, AU11.
To use this feature a new asm disk attribute must be set to 12.1.0.1.
Disk group attribute PHYS_META_REPLICATED
The status of the physical metadata replication can be checked by querying the disk group attribute PHYS_META_REPLICATED. Here is an example with the asmcmd command that shows how to check the replication status for disk group DATA:
Create a disk group with compatibile attribute 11.2
SQL> create diskgroup DG1 external redundancy disk '/dev/sdc1' attribute COMPATIBLE.ASM'='11.2';
Diskgroup created.
Check the replication status:
$ asmcmd lsattr -G DG1 -l phys_meta_replicated
Name Value
There is no value for the DG1
Let's check the diskgroup header using kfed for flags,
Note: flag = 0 no replication of disk header
flag = 1 replication
flag = 2 replication is in progress
$ kfed read /dev/sdc1 | egrep "type|dskname|grpname|flags"
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
kfdhdb.dskname: DG1_0000 ; 0x028: length=8
kfdhdb.grpname: DG1 ; 0x048: length=3
kfdhdb.flags: 0 ; 0x0fc: 0x00000000
As you see the 0 is set means no disk header replication.
Now lets change the attribute of disk to 12.1, this time use asmcmd rather alter disk group
$asmcmd setattr -G DG1 compatible.asm 12.1.0.0.0
$ asmcmd lsattr -G DG1 -l phys_meta_replicated
Name Value
phys_meta_replicated true
As you see now the disk group phs_meta_replicated showing true now,
Lets check at the disk header directly using kfed.
$ kfed read /dev/sdc1 | egrep "dskname|flags"
kfdhdb.dskname: DG1_0000 ; 0x028: length=8
kfdhdb.flags: 1 ; 0x0fc: 0x00000001
Flags set to 1 means the header is replication, the other status numbers are 0 which is not replicated and 2 means the header replication is in progress.
ASM version 12 replicates the physically addressed metadata, i.e. it keeps the copy of AU0 in AU11 - on the same disk. This allows ASM to automatically recover from damage to any data in AU0. Note that ASM will not be able to recover from loss of any other data in an external redundancy disk group. In a normal redundancy disk group, ASM will be able to recover from a loss of any data in one or more disks in a single failgroup. In a high redundancy disk group, ASM will be able to recover from a loss of any data in one or more disks in any two failgroups.
Follow Me!!!