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

  1. 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://OCRBACKUP/backup00.ocr.274.991212953 0

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

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

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

rac1 2018/10/22 07:11:01 +DATA://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]

  1. 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

  1. 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.

$/bin/amdu -diskstring '' -extract

Example:

$/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://OCRBACKUP/backup00.ocr.274.991212953

  1. 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
###########################################

posted @ 2023-07-25 15:32  武汉OracleDBA  阅读(185)  评论(0编辑  收藏  举报