Monday, September 16, 2013

OCR and Voting Disks

[PROD]o:DUMMY:/u01/app/11.2.0/grid/bin$ ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2272
         Available space (kbytes) :     259848
         ID                       :  107238021
         Device/File Name         : /u02/RAC/ocr1/data1.ocr
                                    Device/File integrity check succeeded
         Device/File Name         : /u02/RAC/ocr2/data2.ocr
                                    Device/File integrity check succeeded
         Device/File Name         : /u02/RAC/ocr3/data3.ocr
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

[PROD]:DUMMY:/u01/app/11.2.0/grid/bin$ ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   823eb26c96754f03bf32dd96682fb2f7 (/u02/RAC/voting1/vdsk1) []
 2. ONLINE   1dbda37c86fd4f6fbf01941a75d32a63 (/u02/RAC/voting2/vdsk2) []
 3. ONLINE   655bfee2f4284f60bfca21a001ba51bf (/u02/RAC/voting3/vdsk3) []
Located 3 voting disk(s).

[PROD]DUMMY:/u01/app/11.2.0/grid/bin$ cat /etc/oracle/ocr.loc
ocrconfig_loc=/u02/RAC/ocr1/data1.ocr
ocrmirrorconfig_loc=/u02/RAC/ocr2/data2.ocr
ocrconfig_loc3=/u02/RAC/ocr3/data3.ocr
local_only=FALSE

Create mirror copy of OCR online
 sudo ocrconfig -add +CRS
Password:

1. Automatic OCR Backup

OCR is automatically backed up physically

Every four hours
At the end of every day
At the end of every week
To check current location of automatic backup of OCR:
ocrconfig –showbackup

Restoring OCR from automatic backup :
Stop oracle clusterware on each node
 crsctl stop crs

Identify the most recent backup
 crs]# ocrconfig -showbackup

Restore the backup file
 crs]# ocrconfig –restore <file_name>

For example , to restore most recent backup
 crs]# ocrconfig –restore $ORA_CRS_HOME/cdata/crs/backup00.ocr
  cluvfy comp ocr –n all

Now restart Oracle clusterware on each node
 crsctl start crs

 2. Manual OCR backup:

 Stop clusterware on every node.
# crsctl stop crs

Export the OCR to specified location using this command.
root@rac1]# ocrconfig – export <path_ name>

For example:
root@rac1]# ocrconfig – export /home/oracle/ocr

Finally restart clusterware on every node
root@rac1]# crsctl start crs

Recover OCR using physical backup:
To restore content on OCR file use import option of ocrconfig command.

First, stop the clusterware on every node.
root@rac1]# crsctl stop crs

Export the OCR to specified location using this command.
root@rac1]# ocrconfig –import <path_ name>

For example:
root@rac1]# ocrconfig –import /home/oracle/ocr

Then run oracle clusterware verification utility to check the integrity of OCR
root@rac1]# cluvfy comp ocr –n all

Finally restart clusterware on every node
root@rac1]# crsctl start crs

No comments:

Post a Comment