Home > Oracle Rac > restoring OCR and Voting disks in 11g R2 after Disk group corruption

restoring OCR and Voting disks in 11g R2 after Disk group corruption

In oracle clusterware 11g Release 2 you no longer have to backup the voting disk , The voting disk is automatically backed up in the OCR as part of the configuration change and is automatically restored to any voting disk added.

If all voting disks are corrupted , you can restore them as follows:

Stop the database and the cluster

-- stop the database

#srvctl stop database -d tstracdb

-- List the nodes in your cluster by running the following


-- stop the clusterware by running the following command as root on all nodes 

#crsctl stop crs

-- if the preceding command fails due to OCR corruption , run the following command as root

#crsctl stop crs -f

-- if the processes still fail to stop  disable the cluster AUTO start and reboot

#crsctl disable crs


Recreate ASM Diskgroup

--This command FAILS because asmca is not able to update the OCR:
asmca -silent -createDiskGroup -diskGroupName OCRVOTING  -disk '/dev/oracle/asm.25.lun' -disk '/dev/oracle/asm.26.lun'  -disk '/dev/oracle/asm.27.lun'  -disk '/dev/oracle/asm.28.lun'  -disk '/dev/oracle/asm.29.lun'  -redundancy HIGH -compatible.asm ''  -compatible.rdbms '' -compatible.advm ''

--Create the Diskgroup Using SQLPLUS Create Diskgroup and save the ASM spfile inside:
create Diskgroup OCRVOTING high redundancy disk '/dev/oracle/asm.25.lun',
'/dev/oracle/asm.26.lun', '/dev/oracle/asm.27.lun',
'/dev/oracle/asm.28.lun', '/dev/oracle/asm.29.lun'
ATTRIBUTE  'compatible.asm'='', 'compatible.rdbms'='';

create spfile='+OCRVOTING' from pfile='/tmp/asm_pfile.ora';
File created.
SQL> shut immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 1069252608 bytes
Fixed Size                  2154936 bytes
Variable Size            1041931848 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted

Restore ocr and voting disk from backup

--List backup

#ocrconfig -showbackup

-- check intregity of the backup

#ocrdump -backupfile  <backup_file_name> 

-- restore OCR from backup

#/u01/GRID/11.2/bin/ocrconfig -restore /u01/GRID/11.2/cdata/cluster01/backup00.ocr

--Check the OCR status after restore:

-- Restore the voting Disk

# /u01/GRID/11.2/bin/crsctl replace votedisk +OCRVOTING

-- Re_enable CRS auto startup

# /u01/GRID/11.2/bin/crsctl enable crs

-- start CRS on host1

# /u01/GRID/11.2/bin/crsctl start crs

--Start CRS on host2

# /u01/GRID/11.2/bin/crsctl start crs

-- Check all the resources are running

#/u01/GRID/11.2/bin/crsctl stat res -t
Categories: Oracle Rac
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: