共計 2277 個字符,預計需要花費 6 分鐘才能閱讀完成。
本文丸趣 TV 小編為大家詳細介紹“OCR 磁盤組掉磁盤如何恢復”,內容詳細,步驟清晰,細節處理妥當,希望這篇“OCR 磁盤組掉磁盤如何恢復”文章能幫助大家解決疑惑,下面跟著丸趣 TV 小編的思路慢慢深入,一起來學習新知識吧。
1. 錯誤情況
由于測試環境,是 12c 數據庫。原來 normal 冗余模式的 OCR_VOTE 磁盤組,少了兩個磁盤
[root@dg2 ~]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. OFFLINE e3c0e462031b4fd9bfb584aa701c2305 () []
2. ONLINE 0e7da0333dff4ffdbf6e8cbd03154416 (/dev/mapper/node1_ocr) [OCR_VOTE]
3. OFFLINE d93e41dd9e4b4ff2bf2658a4cce9ffba () []
2. 恢復過程 2.1 停止 crs,獨占模式啟動
[root@dg2 rac-cluster]#crsctl stop crs -f
[root@dg2 rac-cluster]#crsctl start crs -excl -nocrs
2.2 創建磁盤組
注意:名稱要和之前 OCR 磁盤組名稱相同,即:OCR_VOTE
SQL create diskgroup OCR_VOTE external redundancy disk /dev/mapper/node1_12cocr attribute compatible.asm = 12.1.0.0
create diskgroup OCR_VOTE external redundancy disk /dev/mapper/node1_12cocr attribute compatible.asm = 12.1.0.0
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15030: diskgroup name OCR_VOTE is in use by another diskgroup
這里報錯了,原因是 OCR 磁盤組中還有一個 votedisk 是 online 狀態,導致無法在創建同樣名稱的磁盤組。
使用 dd 掉這個磁盤就行了。
[root@dg2 ~]# dd if=/dev/zero of=/dev/mapper/node1_ocr bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 0.305399 s, 3.4 GB/s
再次創建,成功
SQL create diskgroup OCR_VOTE external redundancy disk /dev/mapper/node1_12cocr attribute compatible.asm = 12.1.0.0
Diskgroup created
2.3 restore ocr
利用自動備份的 OCR 恢復即可
[root@dg2 rac-cluster]# ocrconfig -restore backup00.ocr
2.4 恢復 votedisk
[root@dg2 rac-cluster]# crsctl replace votedisk +OCR_VOTE
CRS-4602: Failed 27 to add voting file 96f3347787194f73bf779f3fe89791af.
Failed to replace voting disk group with +OCR_VOTE.
CRS-4000: Command Replace failed, or completed with errors.
這里又報錯了。
解決方法:
SQL create spfile = +OCR_VOTE from memory;
File created.
SQL startup force
ASM instance started
Total System Global Area 1140850688 bytes
Fixed Size 2933400 bytes
Variable Size 1112751464 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL exit
再次恢復
[root@dg2 rac-cluster]# crsctl replace votedisk +OCR_VOTE
Successful addition of voting disk 6ab7db87be1b4f77bf50bb2e5e307a7e.
Successfully replaced voting disk group with +OCR_VOTE.
CRS-4266: Voting file(s) successfully replaced
2.5 重啟集群
crsctl stop crs -f
crsctl start crs
讀到這里,這篇“OCR 磁盤組掉磁盤如何恢復”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注丸趣 TV 行業資訊頻道。
正文完