首页 > 数据库 > Oracle > 11gr2 RAC OCR与VOTEDISK恢复
背景:存储故障,导致数据库sysdg、datadg盘组毁坏,数据库、OCR、votedisk全部丢失;所有数据丢失,重建数据库是肯定的了,但是重建之前也要先恢复CRS;下面则是恢复OCR与VOTEDISK的过程;
环境:oel6u4 、11gr2 RAC、GI、ASM,ocr/votedisk on asm
1) 重建原ocr和votedisk所在磁盘组
root用户:
停止HA
#/etc/init.d/ohas stop
或者
#./crsctl stop crs –f
以-excl -nocrs 方式启动集群,这将启动ASM实例 但不启动CRS
#./crsctl start crs –excl –nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'htdb1'
CRS-2676: Start of 'ora.mdnsd' on 'htdb1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'htdb1'
CRS-2676: Start of 'ora.gpnpd' on 'htdb1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'htdb1'
CRS-2672: Attempting to start 'ora.gipcd' on 'htdb1'
CRS-2676: Start of 'ora.cssdmonitor' on 'htdb1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'htdb1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'htdb1'
CRS-2672: Attempting to start 'ora.diskmon' on 'htdb1'
CRS-2676: Start of 'ora.diskmon' on 'htdb1' succeeded
CRS-2676: Start of 'ora.cssd' on 'htdb1' succeeded
CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'htdb1'
CRS-2672: Attempting to start 'ora.ctssd' on 'htdb1'
CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'htdb1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'htdb1'
CRS-2676: Start of 'ora.ctssd' on 'htdb1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'htdb1' succeeded
CRS-2679: Attempting to clean 'ora.asm' on 'htdb1'
CRS-2681: Clean of 'ora.asm' on 'htdb1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'htdb1'
CRS-2676: Start of 'ora.asm' on 'htdb1' succeeded
[root@htdb1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4534: Cannot communicate with Event Manager
#su - grid
#sqlplus / as sysasm
SQL>create diskgroup sysdg external redundancy disk '/dev/raw/raw17' attribute 'compatible.rdbms' = '11.2','compatible.asm' = '11.2';
Diskgroup created.
2) 从ocr backup中恢复OCR
[root@htdb1 bin]# ./ocrconfig -showackup
PROT-26: Oracle Cluster Registry backup locations were retrieved from a local copy
htdb1 2014/07/18 17:40:56 /u01/app/11.2.0/grid/cdata/htdb-cluster/backup00.ocr
htdb1 2014/07/18 13:40:55 /u01/app/11.2.0/grid/cdata/htdb-cluster/backup01.ocr
htdb1 2014/07/18 09:40:55 /u01/app/11.2.0/grid/cdata/htdb-cluster/backup02.ocr
htdb1 2014/07/17 13:40:45 /u01/app/11.2.0/grid/cdata/htdb-cluster/day.ocr
htdb1 2014/07/10 05:39:54 /u01/app/11.2.0/grid/cdata/htdb-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
[root@htdb1 bin]# ./ocrconfig -restore /u01/app/11.2.0/grid/cdata/htdb-cluster/backup00.ocr
3) 恢复表决盘votedisk
[root@htdb1 bin]# ./crsctl replace votedisk +sysdg
Successful addition of voting disk 33df2ca799df4f05bf902ad1ef9ae1d4.
Successfully replaced voting disk group with +sysdg.
CRS-4266: Voting file(s) successfully replaced
[root@htdb1 bin]#
ocr和vot恢复后,crs等服务就会自动起来了
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16976507/viewspace-1252886/ ,如需转载,请注明出处,否则将追究法律责任。