一、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 <filename>
- Export OCR/OLR contents to a file
[-local] -import <filename> - Import OCR/OLR contents from a file
[-local] -upgrade [<user> [<group>]]
- Upgrade OCR from previous version
-downgrade [-version <version string>]
- Downgrade OCR to the specified version
[-local] -backuploc <dirname> - Configure OCR/OLR backup location
[-local] -showbackup [auto|manual] - Show OCR/OLR backup information
[-local] -manualbackup - Perform. OCR/OLR backup
[-local] -restore <filename> - Restore OCR/OLR from physical backup
-replace <current filename> -replacement <new filename>
- Replace a OCR device/file <filename1> with <filename2>
-add <filename> - Add a new OCR device/file
-delete <filename> - Remove a OCR device/file
-overwrite - Overwrite OCR configuration on disk
-repair -add <filename> | -delete <filename> | -replace <current filename> -replacement <new filename>
- Repair OCR configuration on the local node
-help - Print out this help information
Note:
* A log file will be created in
$ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.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 �Cexport [ path ]
还原命令
ocrconfig �Cimport [ 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
oracle视频教程请关注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html