11g RAC OCR,VOTING DISK存儲所有損壞,利用自動備份,恢復OCR,VOTING DISK到新存儲。

背景:node

11g R2 rac 的orc ,voting disk asm存儲磁盤所有損壞。經過調查得知 損壞的 OCR磁盤對應爲 VOL1 ,
voting disk磁盤對應於 VOL2 。 故,添加asm新存儲(過程省略),設置爲舊配置名 VOL1,VOL2 。 sql

/usr/sbin/oracleasm createdisk VOL1 /dev/sdb1
/usr/sbin/oracleasm createdisk VOL2 /dev/sdc1oracle

[root@node1 bin]# /usr/sbin/oracleasm listdisks -- 查看 listdisks 。
VOL1
VOL2
VOL3 -- 說明此爲沒有損壞的asm
VOL4 -- 說明此爲沒有損壞的asmapp

存儲配置完成後,正式恢復OCR,VOTING DISK 操做流程:spa

1. 以-excl -nocrs 方式啓動cluster,這將能夠啓動ASM實例 但不啓動CRS3d

# crsctl start crs -excl -nocrs rest

2.以 sqlplus / as sysasm 登陸asm,重建原ocr和votedisk所在diskgroup,注意compatible.asm必須是11.2 。
## 注意 DISKGROUP 名爲舊ORC,VOTING DISK磁盤組名。ci

SQL> CREATE DISKGROUP griddg external REDUNDANCY
DISK 'ORCL:vol1','ORCL:vol2' ATTRIBUTE 'compatible.asm'='11.2.0.0.0';
Diskgroup created.string

3.從ocr 自動 backup 中恢復ocr並作ocrcheck檢驗:
[root@node1 bin]# ./ocrconfig -restore /u01/app/11.2.0/grid/cdata/scan-cluster/backup02.ocrit

[root@node1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3068
Available space (kbytes) : 259052
ID : 1970085021
Device/File Name : +GRIDDG
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded

4.準備恢復votedisk
[root@node1 bin]# ./crsctl replace votedisk +GRIDDG
Successful addition of voting disk aede3b23ab684fc8bfc52d1bf5a45ea6.
Successful deletion of voting disk 138dbfa62e2d4feabf73d9ec4cb70c68.
Successfully replaced voting disk group with +GRIDDG.
CRS-4266: Voting file(s) successfully replaced

恢復完成。

若是第四步中可能會遇到下面的錯誤:
[grid@vrh1 ~]$ crsctl replace votedisk +SYSTEMDG
CRS-4602: Failed 27 to add voting file 2e4e0fe285924f86bf5473d00dcc0388.
CRS-4602: Failed 27 to add voting file 4fa54bb0cc5c4fafbf1a9be5479bf389.
CRS-4602: Failed 27 to add voting file a109ead9ea4e4f28bfe233188623616a.
CRS-4602: Failed 27 to add voting file 042c9fbd71b54f5abfcd3ab3408f3cf3.
CRS-4602: Failed 27 to add voting file 7b5a8cd24f954fafbf835ad78615763f.
Failed to replace voting disk group with +SYSTEMDG.
CRS-4000: Command Replace failed, or completed with errors.
須要從新配置一下ASM的參數,並重啓ASM:

SQL> alter system set asm_diskstring=‘/dev/asm*’;System altered. SQL> create spfile from memory;File created. SQL> startup force mount;ORA-32004: obsolete or deprecated parameter(s) specified for ASM instanceASM instance startedTotal System Global Area 283930624 bytesFixed Size 2227664 bytesVariable Size 256537136 bytesASM Cache 25165824 bytesASM diskgroups mounted SQL> show parameter spfileNAME TYPE VALUE—————————————————— ————— ———————————————spfile string /g01/11.2.0/grid/dbs/spfi le+ASM1.ora [grid@vrh1 trace]$ crsctl replace votedisk +SYSTEMDGCRS-4256: Updating the profileSuccessful addition of voting disk 85edc0e82d274f78bfc58cdc73b8c68a.Successful addition of voting disk 201ffffc8ba44faabfe2efec2aa75840.Successful addition of voting disk 6f2a25c589964faabf6980f7c5f621ce.Successful addition of voting disk 93eb315648454f25bf3717df1a2c73d5.Successful addition of voting disk 3737240678964f88bfbfbd31d8b3829f.Successfully replaced voting disk group with +SYSTEMDG.CRS-4256: Updating the profileCRS-4266: Voting file(s) successfully replaced

相關文章
相關標籤/搜索