CRS中常用的OCR和Votedisk的操作命令小结
erpdb1$[/home/oracle]crsctl query css votedisk
0. 0 /dev/jcerp_vote_disk3
1. 0 /dev/jcerp_vote_disk1
2. 0 /dev/jcerp_vote_disk2
located 3 votedisk(s).
备份votedisk: dd if=/dev/raw/votediskcopied of=/dev/raw/raw1
恢复votedisk: dd if=/dev/raw/raw1 of=/dev/raw/votediskcopied
查看ocrs的信息:
erpdb1$[/home/oracle]ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 261916
Used space (kbytes) : 4368
Available space (kbytes) : 257548
ID : 1501608293
Device/File Name : /dev/jcerp_ocr_disk1
Device/File integrity check succeeded
Device/File Name : /dev/jcerp_ocr_disk2
Device/File integrity check succeeded
Cluster registry integrity check succeeded
导出导入
可以用raw的命令来备份和恢复,不过ocrconfig提供了专门的命令来导出和导入还提供了镜像的方法
OCR手动导出:ocrconfig -export /tmp/ocr_bak
OCR手动导入:ocrconfig -import /tmp/ocr_bak
恢复OCR ocrconfig -restore /opt/product/10.2.0.1/crs/cdata/crs/backup01.ocr
添加OCR镜像盘:
创建用于镜像OCR的RAW设备,比如为:/dev/raw/ocrcopied
用ocrconfig –export 导出OCR的信息
编辑/etc/oracle/ocr.loc文件,添加ocrmirrorconfig_loc行
$ cat ocr.loc
ocrconfig_loc=/dev/raw/raw2
ocrmirrorconfig_loc=/dev/raw/ocrcopied
local_only=FALSE
用ocrconfig –import 导入OCR的信息