How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062983.1] 当OCR存于ASM且损坏时,不能直接恢复; 因为ocrconfig -restore需要ASM处于运行状态才能执行成功,而OCR丢失又导致ASM无法启动,由此产生了悖论; 对于11202,可采用如下方法应对: 背景 When using an ASM disk group for CRS there are typically 3 different types of files located in the disk group that potentially need to be restored/recreated: the Oracle Cluster Registry file (OCR) the Voting file(s) the shared SPFILE for the ASM instances The following example assumes that the OCR was located in a single disk group used exclusively for CRS. The disk group has just one disk using external redundancy. Since the CRS disk group has been lost the CRS stack will not be available on any node. 如果将OCR恢复到新的磁盘组,还应修改/etc/oracle/ocr.loc文件 This document assumes that the name of the OCR diskgroup remains unchanged, however there may be a need to use a different diskgroup name, in which case the name of the OCR diskgroup would have to be modified in /etc/oracle/ocr.loc across all nodes prior to executing the following steps. 首先确定OCR存有备份,在跳过CRS的前提下启动clusterware,先后恢复OCR/voting disk OCR自动备份集可位于集群中任一节点,应逐个查找 [oracle@justin ~]$ ocrconfig -showbackup
justin 2013/05/16 04:43:30 /orasw/app/11.2.0.3/grid/cdata/backup00.ocr
justin 2013/05/16 00:43:29 /orasw/app/11.2.0.3/grid/cdata/backup01.ocr
justin 2013/05/15 20:43:29 /orasw/app/11.2.0.3/grid/cdata/backup02.ocr
justin 2013/05/14 08:43:26 /orasw/app/11.2.0.3/grid/cdata/day.ocr
justin 2013/05/02 22:14:05 /orasw/app/11.2.0.3/grid/cdata/week.ocr
关闭所有GI服务
# $CRS_HOME/bin/crsctl stop crs -f
跳过CRS以排他方式启动GI
# $CRS_HOME/bin/crsctl start crs -excl -nocrs CRS-4123: Oracle High Availability Services has been started.
...
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'auw2k3'
CRS-2672: Attempting to start 'ora.ctssd' on 'racnode1'
CRS-2676: Start of 'ora.drivers.acfs' on 'racnode1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'racnode1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'racnode1'
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded
登陆ASM创建丢失的磁盘组,然后导入最新OCR备份
SQL> create diskgroup CRS external redundancy disk 'ORCL:ASMD40' attribute 'COMPATIBLE.ASM' = '11.2';
Diskgroup created.
# cd $CRS_HOME/cdata/rac_cluster1/
# $CRS_HOME/bin/ocrconfig -restore backup00.ocr
重建voting disk
# $CRS_HOME/bin/crsctl replace votedisk +CRS
Successful addition of voting disk 00caa5b9c0f54f3abf5bd2a2609f09a9.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced
关闭并重启CRS
# $CRS_HOME/bin/crsctl stop crs -f
...
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'auw2k3' has completed
CRS-4133: Oracle High Availability Services has been stopped.
# $CRS_HOME/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-761283/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15480802/viewspace-761283/