ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 转帖---SUN系列RAC之六:使用物理备份恢复损坏的OCR

转帖---SUN系列RAC之六:使用物理备份恢复损坏的OCR

原创 Linux操作系统 作者:andyxu 时间:2009-12-08 09:43:14 0 删除 编辑

1 定位一个最新的OCR物理备份。$ ocrconfig -showbackup
2 查看其内容。# ocrdump -backupfile backup00.ocr
3 在所有节点上停止Clusterware。# crsctl stop crs
4 OCR检查
cat /etc/oracle/ocr.loc
5 用一个物理的OCR备份进行还原。
# ocrconfig -restore $ORA_CRS_HOME/cdata/crs/day.ocr
6 在所有节点上启动CRS
# crsctl start crs
7 OCR一致性检查
$ cluvfy comp ocr -n all

1 定位一个最新的OCR物理备份rac1-> ocrconfig -showbackup

rac1 2009/03/08 15:43:10 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac2 2008/08/30 21:26:30 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac2 2008/08/30 17:26:29 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac1 2009/03/08 15:43:10 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs

rac1 2009/03/08 15:43:10 /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1-> cd /u01/app/oracle/product/10.2.0/crs_1/cdata/crs
rac1-> ls -l
total 12132
-rw-r--r-- 1 root root 4136960 Mar 8 15:43 backup00.ocr
-rw-r--r-- 1 root root 4136960 Mar 8 15:43 day.ocr
-rw-r--r-- 1 root root 4136960 Mar 8 15:43 week.ocr
rac1->

2 查看其内容。# ocrdump -backupfile backup00.ocr
[root@rac1 crs]# ocrdump -backupfile backup00.ocr
-bash: ocrdump: command not found
[root@rac1 crs]#
[root@rac1 crs]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrdump -backupfile backup00.ocr
PROT-302: Failed to initialize ocrdump
[root@rac1 crs]#
经查,这是10.2.0.1的BUG,在10.2.0.3得到修复。
以下信息来源于:10g Release 2 (10.2.0.4) Patch Set 3 for Linux x86
Fixed in Release Bug Number Description
10.2.0.3 4966320 OCRDUMP -BACKUPFILE FAILED WITH PROT-302

3 在所有节点上停止Clusterware。[root@rac1 crs]# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac1 crs]#

[root@rac2 bin]#
[root@rac2 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac2 bin]#

4 OCR检查
[root@rac1 crs]# cat /etc/oracle/ocr.loc
ocrconfig_loc=/ocfs/clusterware/ocr
local_only=FALSE
[root@rac1 crs]#

5 用一个物理的OCR备份进行还原。[root@rac1 crs]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -restore backup00.ocr
[root@rac1 crs]#

6 在所有节点上启动CRS
[root@rac1 crs]#
[root@rac1 crs]# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@rac1 crs]#

[root@rac2 bin]# ./crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@rac2 bin]#

rac1-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.devdb.db application ONLINE ONLINE rac1
ora....b1.inst application ONLINE ONLINE rac1
ora....b2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

7 OCR一致性检查rac1->
rac1-> 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.
rac1->

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

请登录后发表评论 登录
全部评论

注册时间:2009-06-26

  • 博文量
    167
  • 访问量
    293256