Thursday 10 March 2011

Voting Disk and OCR in 11gR2 On ASM Storage

Having just delivered an Oracle Database 11gR2 RAC Admin course, I’d like to point out some remarkable changes in the way we handle now the important Clusterware components Voting Disk and Oracle Cluster Registry (OCR): Amazingly, we can now store the two inside of an Automatic Storage Management (ASM) Disk Group, which was not possible in 10g.

Then you cannot create more than 1 voting disk in the same or on another/different diskgroup disk when using External Redundancy in 11.2.

The rules are as follows:
External = 1 voting disk
Normal= 3 voting disk
High= 5 voting disk

External redundancy diskgroup depends on the third party hardware vendor to handle the redundancy.

If you want to have the voting disk multiplexed at ASM level then it is recommended you change your redundancy to Normal so that ASM provides this redundancy for you.

The OCR is striped and mirrored (if we have a redundancy other than external), similar as ordinary Database Files are. So we can now leverage the mirroring capabilities of ASM to mirror the OCR also, without having to use multiple RAW devices for that purpose only. The Voting Disk (or Voting File, as it is now also referred to) is not striped but put as a whole on ASM Disks – if we use a redundancy of normal on the Diskgroup, 3 Voting Files are placed, each on one ASM Disk. This is a concern, if our ASM Diskgroups consist of only 2 ASM Disks! Therefore, the new quorum failgroup clause was introduced:

create diskgroup data normal redundancy

failgroup fg1 disk 'ORCL:ASMDISK1'

failgroup fg2 disk 'ORCL:ASMDISK2'

quorum failgroup fg3 disk 'ORCL:ASMDISK3'

attribute 'compatible.asm' = '11.2.0.0.0';

The failgroup fg3 above needs only one small Disk (300 MB should be on the safe side here, since the Voting File is only about 280 MB in size) to keep one Mirror of the Voting File. fg1 and fg2 will contain each one Voting File and all the other stripes of the Database Area as well, but fg3 will only get that one Voting File.

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/crsctl query css votedisk

## STATE File Universal Id File Name Disk group

-- ----- ----------------- --------- ---------

1. ONLINE 511de6e64e354f9bbf4be318fc928c28 (ORCL:ASMDISK1) [DATA]

2. ONLINE 2f1973ed4be84f50bffc2475949b428f (ORCL:ASMDISK2) [DATA]

3. ONLINE 5ed44fb7e79c4f79bfaf09b402ba70df (ORCL:ASMDISK3) [DATA]

Another important change regarding the Voting File is that it is no longer supported to take a manual backup of it with dd. Instead, the Voting File gets backed up automatically into the OCR. As a New Feature, you can now do a manual backup of the OCR any time you like, without having to wait until that is done automatically – which is also still done:

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -showbackup

uhesse1 2010/10/06 09:37:30 /u01/app/11.2.0/grid/cdata/cluhesse/backup00.ocr

uhesse1 2010/10/06 05:37:29 /u01/app/11.2.0/grid/cdata/cluhesse/backup01.ocr

uhesse1 2010/10/06 01:37:27 /u01/app/11.2.0/grid/cdata/cluhesse/backup02.ocr

uhesse1 2010/10/05 01:37:21 /u01/app/11.2.0/grid/cdata/cluhesse/day.ocr

uhesse1 2010/10/04 13:37:19 /u01/app/11.2.0/grid/cdata/cluhesse/week.ocr

Above are the automatic backups of the OCR as in earlier versions. Now the manual backup:

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -manualbackup

uhesse1 2010/10/06 13:07:03 /u01/app/11.2.0/grid/cdata/cluhesse/backup_20101006_130703.ocr

I got a manual backup on the default location on my master node. We can define another backup location for the automatic backups as well as for the manual backups – preferrable on a Shared Device that is accessible by all the nodes (which is not the case with /home/oracle, unfortunately :-) ):

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -backuploc /home/oracle

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -manualbackup

uhesse1 2010/10/06 13:10:50 /home/oracle/backup_20101006_131050.ocr

uhesse1 2010/10/06 13:07:03 /u01/app/11.2.0/grid/cdata/cluhesse/backup_20101006_130703.ocr

[root@uhesse1 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -showbackup

uhesse1 2010/10/06 09:37:30 /u01/app/11.2.0/grid/cdata/cluhesse/backup00.ocr

uhesse1 2010/10/06 05:37:29 /u01/app/11.2.0/grid/cdata/cluhesse/backup01.ocr

uhesse1 2010/10/06 01:37:27 /u01/app/11.2.0/grid/cdata/cluhesse/backup02.ocr

uhesse1 2010/10/05 01:37:21 /u01/app/11.2.0/grid/cdata/cluhesse/day.ocr

uhesse1 2010/10/04 13:37:19 /u01/app/11.2.0/grid/cdata/cluhesse/week.ocr

uhesse1 2010/10/06 13:10:50 /home/oracle/backup_20101006_131050.ocr

uhesse1 2010/10/06 13:07:03 /u01/app/11.2.0/grid/cdata/cluhesse/backup_20101006_130703.ocr

Conclusion: The way to handle Voting Disk and OCR has changed significantly – they can be kept inside of an ASM Diskgroup especially.

No comments:

Post a Comment