1 首先手动备份OCR
[root@raw1 cluvfy]# ocrconfig -export /u01/ocr.exp
[root@raw1 cluvfy]# ls -l /u01/ocr.exp
-rw-r--r-- 1 root root 104198 Jan 12 17:58 /u01/ocr.exp
2 查看OCR文件并手动损坏OCR文件
[root@raw1 raw1]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 200560
Used space (kbytes) : 4648
Available space (kbytes) : 195912
ID : 1326744169
Device/File Name : /dev/raw/raw22
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw23
Device/File integrity check succeeded
Cluster registry integrity check succeeded
root@raw1 cluvfy]# dd if=/dev/zero of=/dev/raw/raw22 bs=1M count=210
root@raw1 cluvfy]# dd if=/dev/zero of=/dev/raw/raw23 bs=1M count=210
再次查看OCR状态 出现错误,所有节点都会报错
[root@raw2 ~]# crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.
[root@raw3 ~]# crs_stat -t
Segmentation fault
3 恢复OCR文件,并查看恢复后OCR状态
[root@raw1 cluvfy]# ocrconfig -import /u01/ocr.exp
[root@raw1 cluvfy]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 200560
Used space (kbytes) : 4648
Available space (kbytes) : 195912
ID : 376031196
Device/File Name : /dev/raw/raw22
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw23
Device/File integrity check succeeded
Cluster registry integrity check succeeded
[root@raw1 cluvfy]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 200560
Used space (kbytes) : 4648
Available space (kbytes) : 195912
ID : 376031196
Device/File Name : /dev/raw/raw22
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw23
Device/File integrity check succeeded
Cluster registry integrity check succeeded
[root@raw2 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.racdb.db application ONLINE ONLINE raw2
ora....b1.inst application ONLINE ONLINE raw1
ora....b2.inst application ONLINE ONLINE raw2
ora....b3.inst application ONLINE ONLINE raw3
ora....W1.lsnr application ONLINE ONLINE raw1
ora.raw1.gsd application ONLINE ONLINE raw1
ora.raw1.ons application ONLINE ONLINE raw1
ora.raw1.vip application ONLINE ONLINE raw1
ora....W2.lsnr application ONLINE ONLINE raw2
ora.raw2.gsd application ONLINE ONLINE raw2
ora.raw2.ons application ONLINE ONLINE raw2
ora.raw2.vip application ONLINE ONLINE raw2
ora....W3.lsnr application ONLINE ONLINE raw3
ora.raw3.gsd application ONLINE ONLINE raw3
ora.raw3.ons application ONLINE ONLINE raw3
ora.raw3.vip application ONLINE ONLINE raw3