How to Restore ASM Based OCR when OCR backup is located in ASM diskgroup? (Doc ID 2569847.1)
In this Document
Goal
Solution
References
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.
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)
SOLUTION
- Locate the latest automatic OCR backup:
- run the command as root user.
- the command works even when the cluster is down.
/bin/ocrconfig -showbackup
rac2 2018/11/03 08:55:57 +DATA:/
rac2 2018/11/03 04:55:52 +DATA:/
rac2 2018/11/03 00:55:45 +DATA:/
rac2 2018/11/02 00:55:09 +DATA:/
rac1 2018/10/22 07:11:01 +DATA:/
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]
- 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.
/bin/ocrconfig -restore
Example:
/bin/ocrconfig -restore +OCR_BKP://OCRBACKUP/backup00.ocr.260.991346585
- If the disk group cannot be mounted, use below procedure.
NOTE: the below procedure assumes the disks part of the OCR backup disk group are available at OS.
-
run the commands as grid OS user:
-
the command will crate a OCR backup image file (.f extension) on the current directory.
$
Example:
$
Here data is the disk group name and 274 is the file number which can be found from +DATA:/
- 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)
REFERENCES
NOTE:1062983.1 - How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems
###########################################
root# ocrconfig -showbackup
root# ocrconfig -backuploc +ERP_OCR
root# ocrconfig -showbackuploc
OCR中保存着整个集群中绝大部分资源的配置信息,如果移动ocr.loc文件,则CRS必然无法启动。
cat /etc/oracle/ocr.loc
Device/file +ERP_OCR getting replaced by device +ERP_OCR/erpdb-cluster/OCRFILE/registry.255.1142426739
ocrconfig_loc=+ERP_OCR/erpdb-cluster/OCRFILE/registry.255.1142426739
###########################################