1、查看是否有OCR备份
# ocrconfig -showbackup
如果没有就备份一份
# ocrconfig -export /oracle/bak/ocr/ocr_11291433_exp.ocr -s online
2、查看当前配置
[[email protected] ocr]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 497744
Used space (kbytes) : 3848
Available space (kbytes) : 493896
ID : 573624763
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
3、添加镜像
如果当前只有一个OCR,不能直接修改位置,首先添加一个mirror ocr,然后再修改
[[email protected] oracle]# ocrconfig -replace ocrmirror /dev/raw/raw5
4、确认
[[email protected] oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 497744
Used space (kbytes) : 3848
Available space (kbytes) : 493896
ID : 573624763
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded
Cluster registry integrity check succeeded
5、移动
[[email protected] ~]$ ocrconfig -replace ocr /dev/raw/raw6
PROT-20: Insufficient permission to proceed. Require privileged user
[[email protected] ~]$ su root
Password:
[[email protected] oracle]# ocrconfig -replace ocr /dev/raw/raw6
6、确认
[[email protected] oracle]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 497744
Used space (kbytes) : 3848
Available space (kbytes) : 493896
ID : 573624763
Device/File Name : /dev/raw/raw6
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded
Cluster registry integrity check succeeded
7、确认所有节点的/etc/oracle/ocr.loc
[[email protected] oracle]# cat /etc/oracle/ocr.loc
#Device/file /dev/raw/raw1 getting replaced by device /dev/raw/raw6
ocrconfig_loc=/dev/raw/raw6
ocrmirrorconfig_loc=/dev/raw/raw5
如果没有同步,进行手工的修改。