7)检查OCR一致性
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrcheck
PROT-601: Failed to initialize ocrcheck
8)使用cluvfy 工具检查一致性
[root@rac1 ~]# /u01/app/oracle/crs/bin/cluvfy comp ocr -n all
Verifying OCR integrity
Unable to retrieve nodelist from Oracle clusterware.
Verification cannot proceed.
9)使用import修复OCR内容
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrconfig -import /u01/app/backup/ocr_bak/ocr.exp
批注:使用restore选项只能导入OCR自动产生的物理备份,import选项只能导入通过export选项导出的的逻辑备份。
10)再次检查OCR磁盘信息
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 200692
Used space (kbytes) : 4052
Available space (kbytes) : 196640
ID : 69183330
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
11)再次使用cluvfy 工具检查一致性
[root@rac1 ~]# /u01/app/oracle/crs/bin/cluvfy comp ocr -n all
Verifying OCR integrity
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
Verification of OCR integrity was unsuccessful on all the nodes.
[oracle@rac1 ~]$ /u01/app/oracle/crs/bin/cluvfy comp ocr -n all --切换到oracle用户执行,成功
Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful.
3.自动备份恢复OCR
1).关闭CRS服务程序
[root@rac1 ~]# /u01/app/oracle/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
2)通过ocrconfig的showbackup选项查看最近的备份
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrconfig -showbackup
rac1 2014/09/03 17:04:45 /u01/app/oracle/crs/cdata/crs
rac1 2014/09/03 13:04:44 /u01/app/oracle/crs/cdata/crs
rac1 2014/09/01 13:00:02 /u01/app/oracle/crs/cdata/crs
rac1 2014/09/03 13:04:44 /u01/app/oracle/crs/cdata/crs
rac2 2014/08/25 12:58:15 /u01/app/oracle/crs/cdata/crs
3)通过ocrconfig的restore或import选项导入OCR数据
语法:ocrconfig -restore filename_location
[root@rac1 ~]# cd /u01/app/oracle/crs/cdata/crs
[root@rac1 crs]# ll
total 23080
-rw-r--r-- 1 root root 4714496 Sep 3 17:04 backup00.ocr
-rw-r--r-- 1 root root 4714496 Sep 3 13:04 backup01.ocr
-rw-r--r-- 1 root root 4714496 Sep 1 13:00 backup02.ocr
-rw-r--r-- 1 root root 4714496 Sep 3 13:04 day.ocr
-rw-r--r-- 1 root root 4714496 Sep 3 17:04 week_.ocr
[root@rac1 crs]# cd ~
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrconfig -restore /u01/app/oracle/crs/cdata/crs/backup00.ocr
4)检查CRS
[root@rac1 ~]# /u01/app/oracle/crs/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 200692
Used space (kbytes) : 4044
Available space (kbytes) : 196648
ID : 69183330
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
使用cluvfy工具检查
[oracle@rac1 ~]$ /u01/app/oracle/crs/bin/cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful.
5)在节点上重启CRS服务
[root@rac1 ~]# /u01/app/oracle/crs/bin/crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly