共计 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 行业资讯频道。
正文完