--备份OLR
[root@rac1 grid]# /u01/app/11.2.0/grid/bin/ocrconfig -local -manualbackup
--关闭 GRID
[root@rac1 grid]# /u01/app/11.2.0/grid/bin/crsctl stop has
--移除OLR
[root@rac1 grid]# mv /u01/app/11.2.0/grid/cdata/rac1.olr /home/grid/
--启动GRID出错
[root@rac1 grid]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
--查看 GRID 日志,提示OLR文件不存在
[oracle@rac1 rac1]$ vi /u01/app/11.2.0/grid/log/rac1/alertrac1.log
2016-08-14 16:44:39.385:
[ohasd(48700)]CRS-0704:Oracle High Availability Service aborted due to Oracle Local Registry error [PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]]. Details at (:OHAS00106:) in /u01/app/11.2.0/grid/log/rac1/ohasd/ohasd.log.
2016-08-14 16:44:39.564:
[ohasd(48711)]CRS-0704:Oracle High Availability Service aborted due to Oracle Local Registry error [PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]]. Details at (:OHAS00106:) in /u01/app/11.2.0/grid/log/rac1/ohasd/ohasd.log.
2016-08-14 16:44:39.743:
[ohasd(48722)]CRS-0704:Oracle High Availability Service aborted due to Oracle Local Registry error [PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]]. Details at (:OHAS00106:) in /u01/app/11.2.0/grid/log/rac1/ohasd/ohasd.log.
2016-08-14 16:44:44.932:
[ohasd(48742)]CRS-0704:Oracle High Availability Service aborted due to Oracle Local Registry error [PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]]. Details at (:OHAS00106:) in /u01/app/11.2.0/grid/log/rac1/ohasd/ohasd.log.
[client(48757)]CRS-10001:CRS-10132: No msg for has:crs-10132 [10][60]
--查看 OHASD日志,提示 OLR文件不存在
[grid@rac1 ohasd]$ vi /u01/app/11.2.0/grid/log/rac1/ohasd/ohasd.log
2016-08-14 16:44:38.811: [ default][1786005280] OHASD Daemon Starting. Command string :restart
2016-08-14 16:44:38.811: [ default][1786005280] Initializing OLR
2016-08-14 16:44:38.813: [ OCROSD][1786005280]utopen:6m': failed in stat OCR file/disk /u01/app/11.2.0/grid/cdata/rac1.olr, errno=2, os err string=No such file or directory
2016-08-14 16:44:38.813: [ OCROSD][1786005280]utopen:7: failed to open any OCR file/disk, errno=2, os err string=No such file or directory
2016-08-14 16:44:38.813: [ OCRRAW][1786005280]proprinit: Could not open raw device
2016-08-14 16:44:38.813: [ OCRAPI][1786005280]a_init:16!: Backend init unsuccessful : [26]
2016-08-14 16:44:38.814: [ CRSOCR][1786005280] OCR context init failure. Error: PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]
2016-08-14 16:44:38.816: [ default][1786005280] Created alert : (:OHAS00106:) : OLR initialization failed, error: PROCL-26: Error while accessing the physical storage Operating System error [No such file or directory] [2]
2016-08-14 16:44:38.816: [ default][1786005280][PANIC] OHASD exiting; Could not init OLR
2016-08-14 16:44:38.816: [ default][1786005280] Done.
--确认OLR文件已经丢失
[root@rac1 grid]# ls /u01/app/11.2.0/grid/cdata/rac1.olr
ls: cannot access /u01/app/11.2.0/grid/cdata/rac1.olr: No such file or directory
--确认备份存在
[root@rac1 grid]# ls -l /u01/app/11.2.0/grid/cdata/rac1
total 13476
-rw------- 1 root root 6803456 Aug 9 10:10 backup_20160809_101046.olr
-rw------- 1 root root 6995968 Aug 14 16:34 backup_20160814_163404.olr
--还原 OLR出错
[root@rac1 grid]# /u01/app/11.2.0/grid/bin/ocrconfig -local -restore /u01/app/11.2.0/grid/cdata/rac1/backup_20160814_163404.olr
PROTL-35: The configured OLR location is not accessible.
--在 /u01/app/11.2.0/grid/cdata 目录中创建 rac1.olr,并赋予600权限后还原成功
[root@rac1 cdata]# touch rac1.olr
[root@rac1 cdata]# chmod 600 rac1.olr
[root@rac1 cdata]# pwd
/u01/app/11.2.0/grid/cdata
[root@rac1 cdata]# /u01/app/11.2.0/grid/bin/ocrconfig -local -restore /u01/app/11.2.0/grid/cdata/rac1/backup_20160814_163404.olr
--启动 GRID
[root@rac1 rac1]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[root@rac1 rac1]# ps -ef|grep pmon
oracle 53901 1 0 17:26 ? 00:00:00 ora_pmon_racdb11
root 54199 10884 0 17:27 pts/0 00:00:00 grep pmon
[root@rac1 rac1]# ps -ef|grep grid
root 1518 1 0 10:19 ? 00:01:38 /u01/app/11.2.0/grid/jdk/jre/bin/java -Xms64m -Xmx256m -classpath /u01/app/11.2.0/grid/tfa/rac1/tfa_home/jar/RATFA.jar:/u01/app/11.2.0/grid/tfa/rac1/tfa_home/jar/je-4.0.103.jar:/u01/app/11.2.0/grid/tfa/rac1/tfa_home/jar/ojdbc6.jar oracle.rat.tfa.TFAMain /u01/app/11.2.0/grid/tfa/rac1/tfa_home
root 53073 1 1 17:25 ? 00:00:02 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
grid 53192 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/oraagent.bin
grid 53203 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/mdnsd.bin
grid 53214 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/gpnpd.bin
grid 53226 1 0 17:25 ? 00:00:01 /u01/app/11.2.0/grid/bin/gipcd.bin
root 53227 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/orarootagent.bin
root 53241 1 1 17:25 ? 00:00:02 /u01/app/11.2.0/grid/bin/osysmond.bin
root 53252 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/cssdmonitor
root 53268 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/cssdagent
grid 53279 1 0 17:25 ? 00:00:00 /u01/app/11.2.0/grid/bin/ocssd.bin
root 53310 1 2 17:26 ? 00:00:02 /u01/app/11.2.0/grid/bin/ologgerd -M -d /u01/app/11.2.0/grid/crf/db/rac1
root 53399 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/octssd.bin reboot
root 53422 1 2 17:26 ? 00:00:02 /u01/app/11.2.0/grid/bin/crsd.bin reboot
grid 53426 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/evmd.bin
grid 53490 53426 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/evmlogger.bin -o /u01/app/11.2.0/grid/evm/log/evmlogger.info -l /u01/app/11.2.0/grid/evm/log/evmlogger.log
root 53534 1 1 17:26 ? 00:00:01 /u01/app/11.2.0/grid/bin/orarootagent.bin
grid 53642 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/oraagent.bin
grid 53644 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/scriptagent.bin
grid 53677 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/opmn/bin/ons -d
grid 53678 53677 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/opmn/bin/ons -d
grid 53705 1 9 17:26 ? 00:00:07 /u01/app/11.2.0/grid/jdk/bin/java -server -Xcheck:jni -Xms128M -Xmx384M -Djava.awt.headless=true -Ddisable.checkForUpdate=true -Dstdstream.filesize=100 -Dstdstream.filenumber=10 -DTRACING.ENABLED=false -Doracle.wlm.dbwlmlogger.logging.level=INFO -Dport.rmi=23792 -jar /u01/app/11.2.0/grid/oc4j/j2ee/home/oc4j.jar -config /u01/app/11.2.0/grid/oc4j/j2ee/home/OC4J_DBWLM_config/server.xml -out /u01/app/11.2.0/grid/oc4j/j2ee/home/log/oc4j.out -err /u01/app/11.2.0/grid/oc4j/j2ee/home/log/oc4j.err
grid 53758 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
grid 53779 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 53818 1 0 17:26 ? 00:00:00 /u01/app/11.2.0/grid/bin/oraagent.bin
root 54207 10884 0 17:27 pts/0 00:00:00 grep grid