安装CRS后执行root.sh报错了
[root@rac10g1 crs]# ./root.sh
WARNING: directory '/app/oracle/product' is not owned by root
WARNING: directory '/app/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
PROT-1: Failed to initialize ocrconfig
Failed to upgrade Oracle Cluster Registry configuration。
在另一个节点查看CRS。
[root@rac10g2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 297084
Used space (kbytes) : 312
Available space (kbytes) : 296772
ID : 1516147408
Device/File Name : /dev/raw/ocr1
Device/File integrity check succeeded
Device/File Name : /dev/raw/ocr2
Device/File integrity check succeeded
Cluster registry integrity check succeeded
正常呀。
看raw设备的状态:
[root@rac10g2 bin]# ls -lt /dev/raw
total 0
crw-r--r-- 1 oracle dba 162, 3 Sep 15 08:56 votedisk1
crw-r--r-- 1 oracle dba 162, 5 Sep 15 08:56 votedisk3
crw-r--r-- 1 oracle dba 162, 4 Sep 15 08:56 votedisk2
crw-r----- 1 root dba 162, 2 Sep 15 08:17 ocr2
crw-r----- 1 root dba 162, 1 Sep 15 08:17 ocr1
查看出错节点的祼设备状态:
[root@rac10g1 init.d]# ls -lrt /dev/raw
total 0
crw-rw---- 1 oracle dba 162, 1 Sep 15 03:56 raw1
crw-r----- 1 root dba 162, 2 Sep 15 03:57 ocr2
crw-r--r-- 1 oracle dba 162, 3 Sep 15 03:57 votedisk1
crw-r--r-- 1 oracle dba 162, 4 Sep 15 03:57 votedisk2
crw-r--r-- 1 oracle dba 162, 5 Sep 15 03:57 votedisk3
-rw-r----- 1 root dba 0 Sep 15 08:36 ocr1
发现问题所在:
解决办法:
[root@rac10g1 init.d]# more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/sbin/modprobe hangcheck-timer
raw /dev/raw/raw1 /dev/sdc1
raw /dev/raw/raw2 /dev/sdc2
raw /dev/raw/raw3 /dev/sdc3
raw /dev/raw/raw4 /dev/sdc5
raw /dev/raw/raw5 /dev/sdc6
mv /dev/raw/raw1 /dev/raw/ocr1
mv /dev/raw/raw2 /dev/raw/ocr2
mv /dev/raw/raw3 /dev/raw/votedisk1
mv /dev/raw/raw4 /dev/raw/votedisk2
mv /dev/raw/raw5 /dev/raw/votedisk3
[root@rac10g1 init.d]# ls -lrt /dev/raw
total 0
crw-rw---- 1 oracle dba 162, 1 Sep 15 03:56 raw1
crw-r----- 1 root dba 162, 2 Sep 15 03:57 ocr2
crw-r--r-- 1 oracle dba 162, 3 Sep 15 03:57 votedisk1
crw-r--r-- 1 oracle dba 162, 4 Sep 15 03:57 votedisk2
crw-r--r-- 1 oracle dba 162, 5 Sep 15 03:57 votedisk3
-rw-r----- 1 root dba 0 Sep 15 08:36 ocr1
[root@rac10g1 init.d]# mv /dev/raw/raw1 /dev/raw/ocr1
mv: overwrite `/dev/raw/ocr1'? y
[root@rac10g1 init.d]# ls -lrt /dev/raw
total 0
crw-rw---- 1 oracle dba 162, 1 Sep 15 03:56 ocr1
crw-r----- 1 root dba 162, 2 Sep 15 03:57 ocr2
crw-r--r-- 1 oracle dba 162, 3 Sep 15 03:57 votedisk1
crw-r--r-- 1 oracle dba 162, 4 Sep 15 03:57 votedisk2
crw-r--r-- 1 oracle dba 162, 5 Sep 15 03:57 votedisk3
修正后再执行:
[root@rac10g1 crs]# ./root.sh
WARNING: directory '/app/oracle/product' is not owned by root
WARNING: directory '/app/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/app/oracle/product' is not owned by root
WARNING: directory '/app/oracle' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname rac10g2 for node 1.
assigning default hostname rac10g1 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac10g2 rac10g2prv rac10g2
node 2: rac10g1 rac10g1prv rac10g1
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.