Oracle RAC 迁移OCR(10g)
Oracle RAC 迁移OCR
如果想要改变一个已经存在的ocr位置或改变一个已经出现故障的ocr位置,那么你就可以使用下面的过程来迁移ocr。
1.查看当前ocr情况
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw7
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw8
Device/File integrity check succeeded
Cluster registry integrity check succeeded
这里raw7为普通ocr,raw8为镜像ocr
2.在Oracle clusterware 运行的节点上执行如下命令:
[oracle@node1 crs_1]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
3.迁移普通ocr
[root@node1 bin]# ./ocrconfig -replace ocr /dev/raw/raw9
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw9
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw8
Device/File integrity check succeeded
Cluster registry integrity check succeeded
可以看到此时raw9已为普通ocr而非raw7
4.迁移镜像ocr
[root@node1 bin]# ./ocrconfig -replace ocrmirror /dev/raw/raw7
[oracle@node1 crs_1]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 153496
Used space (kbytes) : 3816
Available space (kbytes) : 149680
ID : 497615595
Device/File Name : /dev/raw/raw9
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw7
Device/File integrity check succeeded
Cluster registry integrity check succeeded
可以看到此时raw7为镜像ocr而非raw8
5.如果做ocr迁移的时候有节点关闭,那么在启动关闭的节点后应该在这个节点上执行如下命令:
ocrconfig -repair