ocr原理 oracle,Oracle技术之RAC Voting disk和OCR的管理

本文档展示了如何在Oracle集群环境中使用OCRcheck工具检查OCR的状态,包括版本、空间使用情况和完整性检查。同时,通过ocrconfig工具进行OCR的添加、删除和备份操作。在进行OCR备份和恢复时,需要停止CRS服务,并确保在不同RAID组上的ASM磁盘组。OCR的逻辑备份和恢复涉及到export和import命令,且在操作前后需关注服务的启停和配置文件的更新。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、OCR

检查ocrcheck

[root@rac1 app]# ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2424

Available space (kbytes) :     259696

ID                       : 1918230846

Device/File Name         :       +CRS

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 app]# ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2424

Available space (kbytes) :     259696

ID                       : 1918230846

Device/File Name         :       +CRS

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac2 app]# ocrconfig -h

Name:

ocrconfig - Configuration tool for Oracle Cluster/Local Registry.

Synopsis:

ocrconfig [option]

option:

[-local] -export

- Export OCR/OLR contents to a file

[-local] -import         - Import OCR/OLR contents from a file

[-local] -upgrade [ []]

- Upgrade OCR from previous version

-downgrade [-version ]

- Downgrade OCR to the specified version

[-local] -backuploc       - Configure OCR/OLR backup location

[-local] -showbackup [auto|manual]  - Show OCR/OLR backup information

[-local] -manualbackup              - Perform. OCR/OLR backup

[-local] -restore        - Restore OCR/OLR from physical backup

-replace -replacement

- Replace a OCR device/file with

-add                     - Add a new OCR device/file

-delete                  - Remove a OCR device/file

-overwrite                          - Overwrite OCR configuration on disk

-repair -add | -delete | -replace -replacement

- Repair OCR configuration on the local node

-help                               - Print out this help information

Note:

* A log file will be created in

$ORACLE_HOME/log//client/ocrconfig_.log. Please ensure

you have file creation privileges in the above directory before

running this tool.

* Only -local -showbackup [manual] is supported.

* Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.

添加删除磁盘镜象:

[root@rac2 app]# ocrconfig -add '+CRSBAK'

检查修改后的配置

[root@rac1 app]# ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2424

Available space (kbytes) :     259696

ID                       : 1918230846

Device/File Name         :       +CRS

Device/File integrity check succeeded

Device/File Name         :    +CRSBAK

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

[root@rac1 app]# ocrconfig -delete '+CRSBAK'

[root@rac1 app]# ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2416

Available space (kbytes) :     259704

ID                       : 1918230846

Device/File Name         :       +CRS

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

建议asm磁盘组放在不同的raid组上

逻辑备份/恢复

备份命令:

ocrconfig –export [ path ]

还原命令

ocrconfig –import [ path ]

还原OCR 的时候,需要停掉各节点crs 服务。还原完成后,重新启动CRS。(如果有必要,注意在每

个节点分别修改ocr.loc的对应使用设备)

OCR手动导出:ocrconfig -export /tmp/ocr_bak

OCR手动导入:ocrconfig -import /tmp/ocr_bak

[root@rac1 app]# ocrconfig -export /oracle/backup/ocr_bak_20100810

[root@rac1 app]# ls -ls /oracle/backup/ocr_bak_20100810

84 -rw-r--r-- 1 root root 80883 Aug  6 20:06 /oracle/backup/ocr_bak_20100810

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值