1、备份asm实例的pfile
su - grid
sqlplus / as sysasm
create pfile=’/home/grid/initasm.ora’ from memory;
2、找到OCR备份文件
/app/11.2.0/grid/cdata/wjrmsvp-cluster/backup01.ocr
3.强制关闭集群
crsctl stop crs -f --两节点都做
4、清理原盘
dd if=/dev/zero of=/dev/sdb bs=1024 count=1000
5、以独占模式启动节点1GRID组件
crsctl start crs -excl -nocrs --只在节点1执行
6、观察启动过程中的集群日志以及集群资源状态。
tail -f /app/11.2.0/grid/log/wjrmsvpcd01/alertwjrmsvpcd01.log
crsctl stat res -t -init
7、重新创建CRS磁盘组
su - grid
sqlplus / as sysasm
create diskgroup CRS external redundancy disk ‘/dev/asm-crsdisk’ attribute ‘compatible.asm’=‘11.2.0.0.0’, ‘compatible.rdbms’=‘11.2.0.0.0’;
8、创建asm实例的spfile文件,并重启asm实例
SQL> create spfile from pfile=’/home/grid/initasm.ora’;
File created.
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2227664 bytes
Variable Size 256537136 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
9、修改asm磁盘路径
SQL> alter system set asm_diskstring=’/dev/asm*’ scope=both;
System altered.
SQL> startup force mount;
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2227664 bytes
Variable Size 256537136 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> show parameter spfile;
NAME TYPE VALUE
spfile string +crs/wjrmsvp-cluster/ASMPARAMETERFILE/REGISTRY.253.1046289573
10、恢复OCR文件并设置votedisk
su - root
ocrconfig -restore /app/11.2.0/grid/cdata/wjrmsvp-cluster/day.ocr --如果使用的是自动备份,则这里需要使用-restore来替换-import
ocrcheck
[root@oeltan1 ~]# crsctl replace votedisk +CRS
Successful addition of voting disk 54e90342890c4f58bf319f3c57c4acd7.
Successful addition of voting disk 5103d7e756f14f69bf3935ace34e5de7.
Successful addition of voting disk 370645ed11324fe5bf99eac9bf5efb21.
Successfully replaced voting disk group with +CRSVOTE.
CRS-4266: Voting file(s) successfully replaced
11、关闭集群并重启
su root
crsctl stop crs -f
crsctl start crs --节点1、2都执行