oracle rac 创建ocr,Oracle rac 11g在线添加ocr,votedisk

/client/ocrconfig_.log. Please ensure

you have file creation privileges in the above directory before

running this tool.

用ocrconfig -replace ocrmirror 添加,发现报错。

root@test233 # ocrconfig -replace ocrmirror /oracle/ocrfile2

PROT-21: Invalid parameter

问了下ricky_zhu,他说可能是文件名需要加” “,再试

root@test233 # ocrconfig -replace ocrmirror "/oracle/ocrfile2"

PROT-21: Invalid parameter

找了找 PROT-21: Invalid parameter是啥意思,

里面只提到mirror超过2个时会报这个错,难道我的超过了2个了?

root@test233 #  ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     262120

Used space (kbytes)      :       3328

Available space (kbytes) :     258792

ID                       :  926476664

Device/File Name         : /oracle/ocrfile1

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

在2个机器上分别试都报这个错误。再想,会不会是需要先创建这个文件?

root@test233 # touch /oracle/ocrfile2

root@test233 # ocrconfig -replace ocrmirror /oracle/ocrfile2

成功!!

root@test233 # ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     262120

Used space (kbytes)      :       3328

Available space (kbytes) :     258792

ID                       :  926476664

Device/File Name         : /oracle/ocrfile1

Device/File integrity check succeeded

Device/File Name         : /oracle/ocrfile2

Device/File integrity check succeeded

Cluster registry integrity check succeeded

Logical corruption check succeeded

察看ocr.loc,发现该文件同时被修改。

root@test233 #  cat /etc/oracle/ocr.loc

#Device/file  getting replaced by device /oracle/ocrfile2

ocrconfig_loc=/oracle/ocrfile1

ocrmirrorconfig_loc=/oracle/ocrfile2

local_only=false

试着添加第二个mirror, 里说,mirror超过1个,ocr file 超过2个就会报”PROT-21: Invalid parameter “错误,试了试,发现不是那么回事。

Try to add the third mirror

# touch /oracle/ocrfile3

root@test233 # ocrconfig -replace ocrmirror /oracle/ocrfile3

root@test233 #

root@test233 # ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     262120

Used space (kbytes)      :       3328

Available space (kbytes) :     258792

ID                       :  926476664

Device/File Name         : /oracle/ocrfile1

Device/File integrity check succeeded

Device/File Name         : /oracle/ocrfile3

Device/File integrity check succeeded

Cluster registry integrity check succeeded

Logical corruption check succeeded

在线删除mirror

root@test233 # ocrconfig -replace ocrmirror

root@test233 # ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     262120

Used space (kbytes)      :       3328

Available space (kbytes) :     258792

ID                       :  926476664

Device/File Name         : /oracle/ocrfile1

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

root@test233 # cat /etc/oracle/ocr.loc

#Device/file /oracle/ocrfile3 being deleted

ocrconfig_loc=/oracle/ocrfile1

local_only=false

root@test233 # rsh test234  cat /etc/oracle/ocr.loc

#Device/file /oracle/ocrfile3 being deleted

ocrconfig_loc=/oracle/ocrfile1

local_only=false

root@test233 # ocrconfig -replace ocrmirror /oracle/ocrfile2

root@test233 #  cat /etc/oracle/ocr.loc

#Device/file  getting replaced by device /oracle/ocrfile2

ocrconfig_loc=/oracle/ocrfile1

ocrmirrorconfig_loc=/oracle/ocrfile2

local_only=false

root@test233 # rsh test234  cat /etc/oracle/ocr.loc

#Device/file  getting replaced by device /oracle/ocrfile2

ocrconfig_loc=/oracle/ocrfile1

ocrmirrorconfig_loc=/oracle/ocrfile2

local_only=false

配置文件同时被修改。

小结: 可以使用 ocrconfig -replace ocrmirror来添加,删除,替换ocrmirror, 添加时需要先手工生成该文件。该命令会同时自动修改配置文件。ocrmirror只能有一个。

Votedisk的添加和删除

root@racibm233 # crsctl check crs

Cluster Synchronization Services appears healthy

Cluster Ready Services appears healthy

Event Manager appears healthy

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值