【RAC】备份与恢复OCR

1停所有节点crs
crsctl stop crs

2备份OCR(导出方式)root用户执行
ocrconfig -export /tmp/ocr.exp

3启动crs并破坏OCR内容
crsctl start crs
dd if=/dev/zero f=/dev/raw/raw1 bs=1024 count=102400

4检查OCR(ocrcheck,cluvfy),此时crs已经自动关闭
[root@rac1 cluvfy]# ocrcheck
PROT-601: Failed to initialize ocrcheck

[root@rac1 cluvfy]# ./runcluvfy.sh comp ocr
Verifying OCR integrity 
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
ERROR: 
Unable to obtain OCR integrity details from any of the nodes.
OCR integrity check failed.
Verification of OCR integrity was unsuccessful on all the nodes.

5恢复OCR(导入方式)root用户执行
ocrconfig -import /tmp/ocr.exp

6再次检查OCR(ocrcheck,cluvfy)
[root@rac1 tmp]# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     104344
         Used space (kbytes)      :       4348
         Available space (kbytes) :      99996
         ID                       :  990580844
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded

         
[root@rac1 cluvfy]# ./runcluvfy.sh comp ocr

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. 

7启动crs所有资源并检查状态是否正常
[root@rac1 cluvfy]# crs_start -all
[root@rac1 cluvfy]# crs_stat -t
此时所有资源及服务应当全部启动,恢复正常。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26148431/viewspace-759767/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26148431/viewspace-759767/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值