/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