7、移除OCR
#OCR可以添加,当然也可以移除OCR,比如对于ocr的镜像使用外部raid冗余方式。不过有个条件是必须至少有一个OCR处于联机状态。
通常可以按照下面的步骤来移除OCR
校验集群处于联机状态(尽可能为所有节点)
检查至少一个ocr处于联机状态
移除pirmary ocr或者ocr mirror
对于ocfs文件系统,移除ocr文件
#使用下面的命令来移除ocr
ocrconfig -replace ocr
ocrconfig -replace ocrmirror
bo2dbs:/u01/Oracle/crs/bin # ps -ef | grep d.bin
oracle 5745 5092 0 17:52 ? 00:00:00 /u01/oracle/crs/bin/evmd.bin
root 5902 5094 0 17:52 ? 00:00:02 /u01/oracle/crs/bin/crsd.bin reboot
oracle 6420 5795 0 17:52 ? 00:00:01 /u01/oracle/crs/bin/ocssd.bin
root 8870 18345 0 18:01 pts/0 00:00:00 grep d.bin
bo2dbs:/u01/oracle/crs/bin # ssh bo2dbp ps -ef | grep d.bin
The authenticity of host 'bo2dbp (192.168.7.51)' can't be established.
RSA key fingerprint is 2a:77:4f:eb:46:5b:07:4a:12:23:5c:69:b2:cd:15:ec.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bo2dbp' (RSA) to the list of known hosts.
Password:
oracle 5837 5122 0 17:54 ? 00:00:00 /u01/oracle/crs/bin/evmd.bin
root 5907 5124 0 17:54 ? 00:00:02 /u01/oracle/crs/bin/crsd.bin reboot
oracle 6672 5756 0 17:54 ? 00:00:01 /u01/oracle/crs/bin/ocssd.bin
#两个ocr都处于online
bo2dbs:/u01/oracle/crs/bin # ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 204560
Used space (kbytes) : 6184
Available space (kbytes) : 198376
ID : 1512159503
Device/File Name : /dev/raw/raw11 #primary ocr
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw21 #mirror ocr
Device/File integrity check succeeded
Cluster registry integrity check succeeded
bo2dbs:/u01/oracle/crs/bin # ./ocrconfig -replace ocr #移除ocr
bo2dbs:/u01/oracle/crs/bin # more /etc/oracle/ocr.loc
#Device/file /dev/raw/raw11 being deleted
ocrconfig_loc=/dev/raw/raw21
local_only=false
bo2dbs:/u01/oracle/crs/bin # ocrcheck
-bash: ocrcheck: command not found
bo2dbs:/u01/oracle/crs/bin # ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 204560
Used space (kbytes) : 6184
Available space (kbytes) : 198376
ID : 1512159503
Device/File Name : /dev/raw/raw21 #可以看到原来的mirror ocr变成了primary ocr
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
