您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本文小编为大家详细介绍“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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。