您好,登錄后才能下訂單哦!
本文小編為大家詳細介紹“OCR磁盤組掉磁盤如何恢復”,內容詳細,步驟清晰,細節處理妥當,希望這篇“OCR磁盤組掉磁盤如何恢復”文章能幫助大家解決疑惑,下面跟著小編的思路慢慢深入,一起來學習新知識吧。
由于測試環境,是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 () []
[root@dg2 rac-cluster]#crsctl stop crs -f [root@dg2 rac-cluster]#crsctl start crs -excl -nocrs
注意:名稱要和之前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
利用自動備份的OCR恢復即可
[root@dg2 rac-cluster]# ocrconfig -restore backup00.ocr
[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
crsctl stop crs -f crsctl start crs
讀到這里,這篇“OCR磁盤組掉磁盤如何恢復”文章已經介紹完畢,想要掌握這篇文章的知識點還需要大家自己動手實踐使用過才能領會,如果想了解更多相關內容的文章,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。