to determine the path defined for the OCR
and its mirror location. Use the following command:
more /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
ocrmirrorconfig_loc=+VOTEOCR
to modify the default path. However, you need to be the root user to successfully run the
command:
./$ORA_GRID_HOME/bin/ocrconfig –backuploc <new_location_details>
After changing the default path, all the subsequent OCR automatic and manual
backups will be generated in the new location.
Run the following command as root user to perform the on-demand OCR
binary backup:
./ocrconfig –manualbackup <directory_name>
====================================================
The following steps demonstrate the procedure to restore the OCR using the latest
binary backup copy on a shared storage device, applicable for 11g R1 and 11g R2.
=====================================================
./ocrconfig –showbackup
./crsctl stop crs (repeat the command on all nodes in 11g R1)
In 11g R2:
./crsctl stop cluster –all (just from the first node)
./crsctl stop crs (repeat the command on all nodes in 11g R2)
./ocrconfig –restore <backup_copy_location_filename>
./crsctl start crs
./ocrcheck
./cluvfy comp ocr –n all -verbose
=================================================
Now, we will look at the procedure to restore an OCR and Voting disk file that
are stored together in the same ASM diskgroup. The steps demonstrate how to
reconstruct the corrupted or lost diskgroup followed by restoring/recovering the
OCR and Voting disk file:
./ocrconfig –showbackup
./crsctl stop crs (use –f flag if you have any issues
stopping the cluster stack)
Start up the cluster stack in exclusive mode on a node that holds the latest
binary backup file for OCR. Run the following command as root user:
./crsctl start crs -excl
Connect to the local ASM instance on the node to recreate the diskgroup first,
ensure the diskgroup COMPATIBLE.ASM attribute is set to 11.2, and run the
following commands as GRID software owner:
export ORACLE_SID=+ASM1 – assuming it is on the first node
export ORACLE_HOME=$ORA_GRID_HOME – set gird home
sqlplus / as sysasm
SQL> CREATE DISKGROUP data EXTERNAL REDUNDANCY
DISK '/dev/diskname1'
ATTRIBUTE 'COMPATIBLE.ASM'='11.2';
As a root user:
./ocrconfig –restore /u00/grid/oracle/product/11.2.0/cdata/
./crsctl start res ora.crsd –init
./crsctl replace votedisk +DATA
./crsctl stop crs
./crsctl start crs (repeat this command on all nodes)
./ocrcheck
./cluvfy comp ocr –n all -verbose
===================================================
Restoring the Voting disk
===================================================
Start up the Clusterware stack on the first node of the cluster in exclusive
mode, using the following command:
./crsctl start crs -excl
./crsctl replace voting disk +DISKGROP_NAME
If the Voting disk was previously stored on shared storage and you want
to restore it on shared storage, use the following command, applicable only
in 11g R2:
./crsctl query css votedisk
Note down the File Universal Id (FUID) of the voting disk
./crsctl delete css votedisk <FUID>
./crsctl add css votedisk <destination_for_votedisk>
./crsctl stop crs –f
./crsctl start crs
crsgrid-scan/backup00.ocr
and its mirror location. Use the following command:
more /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
ocrmirrorconfig_loc=+VOTEOCR
to modify the default path. However, you need to be the root user to successfully run the
command:
./$ORA_GRID_HOME/bin/ocrconfig –backuploc <new_location_details>
After changing the default path, all the subsequent OCR automatic and manual
backups will be generated in the new location.
Run the following command as root user to perform the on-demand OCR
binary backup:
./ocrconfig –manualbackup <directory_name>
====================================================
The following steps demonstrate the procedure to restore the OCR using the latest
binary backup copy on a shared storage device, applicable for 11g R1 and 11g R2.
=====================================================
./ocrconfig –showbackup
./crsctl stop crs (repeat the command on all nodes in 11g R1)
In 11g R2:
./crsctl stop cluster –all (just from the first node)
./crsctl stop crs (repeat the command on all nodes in 11g R2)
./ocrconfig –restore <backup_copy_location_filename>
./crsctl start crs
./ocrcheck
./cluvfy comp ocr –n all -verbose
=================================================
Now, we will look at the procedure to restore an OCR and Voting disk file that
are stored together in the same ASM diskgroup. The steps demonstrate how to
reconstruct the corrupted or lost diskgroup followed by restoring/recovering the
OCR and Voting disk file:
./ocrconfig –showbackup
./crsctl stop crs (use –f flag if you have any issues
stopping the cluster stack)
Start up the cluster stack in exclusive mode on a node that holds the latest
binary backup file for OCR. Run the following command as root user:
./crsctl start crs -excl
Connect to the local ASM instance on the node to recreate the diskgroup first,
ensure the diskgroup COMPATIBLE.ASM attribute is set to 11.2, and run the
following commands as GRID software owner:
export ORACLE_SID=+ASM1 – assuming it is on the first node
export ORACLE_HOME=$ORA_GRID_HOME – set gird home
sqlplus / as sysasm
SQL> CREATE DISKGROUP data EXTERNAL REDUNDANCY
DISK '/dev/diskname1'
ATTRIBUTE 'COMPATIBLE.ASM'='11.2';
As a root user:
./ocrconfig –restore /u00/grid/oracle/product/11.2.0/cdata/
./crsctl start res ora.crsd –init
./crsctl replace votedisk +DATA
./crsctl stop crs
./crsctl start crs (repeat this command on all nodes)
./ocrcheck
./cluvfy comp ocr –n all -verbose
===================================================
Restoring the Voting disk
===================================================
Start up the Clusterware stack on the first node of the cluster in exclusive
mode, using the following command:
./crsctl start crs -excl
./crsctl replace voting disk +DISKGROP_NAME
If the Voting disk was previously stored on shared storage and you want
to restore it on shared storage, use the following command, applicable only
in 11g R2:
./crsctl query css votedisk
Note down the File Universal Id (FUID) of the voting disk
./crsctl delete css votedisk <FUID>
./crsctl add css votedisk <destination_for_votedisk>
./crsctl stop crs –f
./crsctl start crs
crsgrid-scan/backup00.ocr
No comments:
Post a Comment