RAC 移动 OCR

1、查看是否有OCR备份

# ocrconfig -showbackup

如果没有就备份一份

# ocrconfig -export /oracle/bak/ocr/ocr_11291433_exp.ocr -s online

2、查看当前配置

[root@r3 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,然后再修改

[root@r3 oracle]# ocrconfig -replace ocrmirror /dev/raw/raw5

4、确认

[root@r3 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、移动

[oracle@r3 ~]$ ocrconfig -replace ocr /dev/raw/raw6

PROT-20: Insufficient permission to proceed. Require privileged user

[oracle@r3 ~]$ su root

Password:

[root@r3 oracle]# ocrconfig -replace ocr /dev/raw/raw6

6、确认

[root@r3 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

[root@r3 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

如果没有同步,进行手工的修改。

posted @ 2016-01-19 20:14  方诚  阅读(293)  评论(0编辑  收藏  举报