h3:2:respawn:/etc/init.crsd run >/dev/null 2>&1
rm -rf /etc/oracle/* rm -f /etc/init.d/init.cssd rm -f /etc/init.d/init.crs rm -f /etc/init.d/init.crsd rm -f /etc/init.d/init.evmd rm -f /etc/inittab.crs
cp /etc/inittab.orig /etc/inittab rm -rf /var/tmp/.oracle rm -rf /tmp/.oracle
(由于执行rootdelete.sh时删除了上面的一些目录或文件,故仅需补充删除存在的即可)
6,使用dd清除vote disk和ocr,需要修改成相应的文件 dd if=/dev/zero of=/dev/raw/raw1 bs=8192 count=12800 dd if=/dev/zero of=/dev/raw/raw2 bs=8192 count=12800
GDGZ-DCS-SV02C-RAC01:/opt # dd if=/dev/zero of=/dev/raw/raw2 bs=8192 count=128000 dd: writing `/dev/raw/raw2': No space left on device 123500+0 records in 123499+0 records out
1011709440 bytes (1.0 GB) copied, 67.9911 seconds, 14.9 MB/s
GDGZ-DCS-SV02C-RAC01:/opt # dd if=/dev/zero of=/dev/raw/raw1 bs=8192 count=128000 dd: writing `/dev/raw/raw1': No space left on device 123496+0 records in 123495+0 records out
1011677184 bytes (1.0 GB) copied, 66.8413 seconds, 15.1 MB/s
(从第4步结果提示来看,应该ocr已经清除了,可以尝试只清除VOTEDISK,可惜我先执行了dd清除命令)
二,重建OCR(这里我独创性的使用图形工具runInstaller,模仿新建的方法来重建OCR) 1,由于首次安装CRS时需要新的空的/opt/oracle /opt/oracrs目录,所以先在各个节点执行如下命令: cd /opt
mv oracle oracle_old mv oracrsoracrs_old
mkdir oracle mkdiroracrs
mkdir /opt/oracle/oraInventory
chownoracle:dba /opt/oracle/oraInventory chmod 755 /opt/oracle/oraInventory chown -R oracle:dba /opt/oracle chmod -R 770 /opt/oracle chown -R oracle:dba /opt/oracrs chmod -R 770 /opt/oracrs
2,xmanager登陆RAC1节点使用图形工具安装CRS(这里可以参考RAC安装过程的CRS安装部分)
oracle用户执行/opt/orabak/clusterware/runInstaller
需要注意的是,这里的CRS安装配置需要和第一次安装配置保持完全一致!!!
安装最后需要根据图形界面提示在各个RAC节点执行root.sh
GDGZ-DCS-SV01C-RAC01:/opt/oracle # /opt/oracrs/root.sh Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory Setting up Network socket directories
Oracle Cluster Registry configuration upgraded successfully Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node
node 1: gdgz-dcs-sv01c-rac01 gdgz-dcs-sv01c-rac01_base gdgz-dcs-sv01c-rac01 node 2: gdgz-dcs-sv02c-rac01 gdgz-dcs-sv02c-rac01_base gdgz-dcs-sv02c-rac01 node 3: gdgz-dcs-sv03c-rac01 gdgz-dcs-sv03c-rac01_base gdgz-dcs-sv03c-rac01 node 4: gdgz-dcs-sv04c-rac01 gdgz-dcs-sv04c-rac01_base gdgz-dcs-sv04c-rac01 Creating OCR keys for user 'root', privgrp 'root'.. Operation successful.
Now formatting voting device: /dev/raw/raw2 Format of 1 voting devices complete.
Startup will be queued to init within 30 seconds. Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds. Cluster Synchronization Services is active on these nodes. gdgz-dcs-sv01c-rac01 gdgz-dcs-sv02c-rac01 gdgz-dcs-sv03c-rac01 gdgz-dcs-sv04c-rac01
Cluster Synchronization Services is active on all the nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M) Running vipca(silent) for configuring nodeapps
Creating VIP application resource on (4) nodes..... Creating GSD application resource on (4) nodes..... Creating ONS application resource on (4) nodes..... Starting VIP application resource on (4) nodes..... Starting GSD application resource on (4) nodes..... Starting ONS application resource on (4) nodes.....
Done.
点击OK后检查有一个失败,根据提示:/opt/oracrs/cfgtoollogs下有出错命令日志 /opt/oracrs/bin/cluvfy stage -post crsinst -n
GDGZ-DCS-SV01C-RAC01,GDGZ-DCS-SV02C-RAC01,GDGZ-DCS-SV03C-RAC01,GDGZ-DCS-SV04C-RAC01
GDGZ-DCS-SV01C-RAC01:/opt/oracrs/cfgtoollogs # vi configToolFailedCommands GDGZ-DCS-SV01C-RAC01:/opt/oracrs/cfgtoollogs # /opt/oracrs/bin/cluvfy stage -post crsinst -n
GDGZ-DCS-SV01C-RAC01,GDGZ-DCS-SV02C-RAC01,GDGZ-DCS-SV03C-RAC01,GDGZ-DCS-SV04C-RAC01
这是root信任关系导致,可以不理!!!