当OCR备份位于ASM磁盘组中时,如何恢复基于ASM的OCR? (Doc ID 2569847.1)

How to Restore ASM Based OCR when OCR backup is located in ASM diskgroup? (Doc ID 2569847.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.

GOAL

From 12.2 onwards, the OCR backups are located in ASM disk group. This document covers the specific restoration steps involved when the OCR backup is located in ASM disk group.  从12.2开始,OCR备份位于ASM磁盘组中。本文档介绍了OCR备份位于ASM磁盘组中时涉及的特定还原步骤。
For the complete procedure of restoring OCR, please refer to: How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems (Doc ID 1062983.1)  有关还原OCR的完整过程,请参阅: (Doc ID 1062983.1) 或参考文章:https://blog.csdn.net/u010692693/article/details/103161200

SOLUTION

1. Locate the latest automatic OCR backup:   找到最新的自动OCR备份:

- run the command as root user.   以root用户身份运行命令。
- the command works even when the cluster is down.  即使群集关闭,该命令也可以使用。

# <GI HOME>/bin/ocrconfig -showbackup

rac2 2018/11/03 08:55:57 +DATA:/<cluster name>/OCRBACKUP/backup00.ocr.274.991212953 0

rac2 2018/11/03 04:55:52 +DATA:/<cluster name>/OCRBACKUP/backup01.ocr.271.991198547 0

rac2 2018/11/03 00:55:45 +DATA:/<cluster name>/OCRBACKUP/backup02.ocr.276.991184139 0

rac2 2018/11/02 00:55:09 +DATA:/<cluster name>/OCRBACKUP/day.ocr.278.991097711 0

rac1 2018/10/22 07:11:01 +DATA:/<cluster name>/OCRBACKUP/week.ocr.273.990169863 0

If the command was run as a non privileged user (non root user), it errors as following:

[oracle@rac2 ~]$ ocrconfig -showbackup
PROT-20: Insufficient permission to proceed. Require privileged user
PROC-26: Error while accessing the physical storage Storage layer error [Insufficient quorum to open OCR devices] [0]

2. If the ASM instance can be started and if the disk group that has the OCR backup can be mounted, run below command as root user to restore OCR.     如果可以启动ASM实例,并且可以mount具有OCR备份的磁盘组,请以root用户身份运行以下命令以还原OCR。

#<GI HOME>/bin/ocrconfig -restore <OCR backup file>


Example:
#<GI HOME>/bin/ocrconfig -restore +OCR_BKP:/<cluster name>/OCRBACKUP/backup00.ocr.260.991346585

3. If the disk group cannot be mounted, use below procedure.  如果无法mount磁盘组,请使用以下步骤。

NOTE: the below procedure assumes the disks part of the OCR backup disk group are available at OS.  注意:以下过程假设OCR备份磁盘组的磁盘部分在OS上可用。

- run the commands as grid OS user:   以grid OS用户身份运行命令:

- the command will crate a OCR backup image file (.f extension) on the current directory.  该命令将在当前目录中创建OCR备份映像文件(扩展名.f)。

$<GI HOME>/bin/amdu -diskstring '<asm diskstring>' -extract <file name to extract>  

Example:

$<GI HOME>/bin/amdu -diskstring '/dev/xvd[c-i]1' -extract data.274  

Here data is the disk group name and 274 is the file number which can be found from +DATA:/<cluster name>/OCRBACKUP/backup00.ocr.274.991212953

4. The above amdu extract command will create a OCR backup image file on the current directory. Now the OCR can be restored using the procedure given in: How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems (Doc ID 1062983.1)   上面的amdu extract命令将在当前目录上创建OCR备份映像文件。现在,可以使用以下过程中给出的过程来还原OCR:How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems (Doc ID 1062983.1)   或参考文章:https://blog.csdn.net/u010692693/article/details/103161200

 

REFERENCES

NOTE:1062983.1 - How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值