Ocrconfig时报PROT-1 Failed to initialize ocrconfig,PROT-16: Internal Error的问题解决

一次存储的操作导致了ORACLE RAC的一个ocr设备近一个小时的无法访问,所以ORACLE RAC OCR设备需要重新配置,与运行的ocr设备进行同步操作.

在节点2执行ocrconfig时报PROT-1 Failed to initialize ocrconfig错误,如下:

[root@scdb_node2 raw]# /oracle/product/10.2.0/crs/bin/ocrconfig -replace ocrmirror /dev/raw/raw2

PROT-1: Failed to initialize ocrconfig

怀疑是节点2crs没有启动,检查crs的状态:

$crs_stat

CRS-0184: Cannot communicate with the CRS daemon.

crs没有正确启动,可以是因为存储的问题,导致的vote盘异常,导致了这个节点被rac踢出.

[@more@]

重新启动crs

[root@scdb_node2 init.d]# /etc/init.d/init.crs start

Startup will be queued to init within 30 seconds.

等待一会以后,再次查询crs的状态:

[root@scdb_node2 init.d]# ps -ef|grep d.bin

oracle 17215 17214 0 18:00 ? 00:00:00 /oracle/product/10.2.0/crs/bin/evmd.bin

root 17316 8991 1 18:00 ? 00:00:00 /oracle/product/10.2.0/crs/bin/crsd.bin reboot

root 17860 17414 0 18:00 ? 00:00:00 /oracle/product/10.2.0/crs/bin/oprocd.bin run -t 1000 -m 500 -f

oracle 18051 17531 0 18:00 ? 00:00:00 /oracle/product/10.2.0/crs/bin/ocssd.bin

root 18720 10455 0 18:01 pts/1 00:00:00 grep d.bin

[root@scdb_node2 init.d]# su - oracle

[oracle@scdb_node2 ~]$ crs_stat

。。。。。。

NAME=ora.SCDB.SCDB_SRV.SCDB2.srv

TYPE=application

TARGET=ONLINE

STATE=ONLINE on scdb_node2

Crs_stat 显示crs已经启动,并且实例也被crs带起来了

检查ocr的状态:

[oracle@scdb_node2 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 304972

Used space (kbytes) : 4072

Available space (kbytes) : 300900

ID : 691296028

Device/File Name : /dev/raw/raw2

Device/File needs to be synchronized with the other device

Device/File Name : /dev/raw/raw1

Device/File integrity check succeeded

发现/dev/raw/raw2需要进行同步,先检查ocr的物理设备是否存在

#ls -lt /dev/raw

crw-rw---- 1 oracle oinstall 162, 4 Sep 15 18:02 raw4

crw-rw---- 1 root oinstall 162, 1 Sep 15 17:50 raw1

没有raw2设备,这说明存储出问题的时候,这个设备定义也丢失了

运行vgscan认盘,运行/etc/rc.local重新定义设备

#vgscan

#/etc/rc.local

#ls -lt /dev/raw

crw-rw---- 1 oracle oinstall 162, 3 Sep 15 18:37 raw3

crw-rw---- 1 oracle oinstall 162, 4 Sep 15 18:37 raw4

crw-rw---- 1 oracle oinstall 162, 5 Sep 15 18:37 raw5

crw-rw---- 1 root oinstall 162, 2 Sep 15 18:04 raw2

crw-rw---- 1 oracle oinstall 162, 6 Sep 15 17:50 raw6

crw-rw---- 1 root oinstall 162, 1 Sep 15 17:50 raw1

再次执行ocrconfig命令,遇到了新的错误PROT-16: Internal Error

[root@scdb_node2 raw]# /oracle/product/10.2.0/crs/bin/ocrconfig -replace ocrmirror /dev/raw/raw2

PROT-16: Internal Error

Crs,ocr 设备都没有问题了,还是遇到这样的问题,有点头疼.查看$ORACLE_HOME/log//client/ocrconfig_.log日志文件,也发现不了什么问题.于是考虑是不是命令的参数有问题.我去检查了/etc/oracle/ocr.loc文件,其内容如下:

[oracle@scdb_node2 ~]$ more /etc/oracle/ocr.loc

#Device/file /dev/raw/raw2 getting replaced by device /dev/raw/raw2

ocrconfig_loc=/dev/raw/raw2

ocrmirrorconfig_loc=/dev/raw/raw1

local_only=false

仔细看这个文档,我发现了问题所在,原来/dev/raw/raw2ocrconfig_loc参数设置的值,不能执行下面的语句:

/oracle/product/10.2.0/crs/bin/ocrconfig -replace ocrmirror /dev/raw/raw2

而是需要把上面的命令修改为:

/oracle/product/10.2.0/crs/bin/ocrconfig -replace ocr /dev/raw/raw2

注意是参数中ocrmirror修改为ocr,执行命令没有任何报错,成功了.然后去检查ocr的状态:

[oracle@scdb_node2 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 304972

Used space (kbytes) : 4072

Available space (kbytes) : 300900

ID : 691296028

Device/File Name : /dev/raw/raw2

Device/File integrity check succeeded

Device/File Name : /dev/raw/raw1

Device/File integrity check succeeded

Cluster registry integrity check succeeded

问题得到了圆满的解决.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/32980/viewspace-1038404/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/32980/viewspace-1038404/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值