1. 首页 > ITPUX技术网 > 正文

数据库Oracle 11g RAC Voting disk和OCR的管理

数据库Oracle 11g RAC Voting disk和OCR的管理

一、OCR
[color=#4169e1]检查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

本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html

联系我们

在线咨询:点击这里给我发消息

微信号:itpux-com

工作日:9:30-18:30,节假日休息