现象描述:
在oracle 10g/11g版本引进的oracle集群软件oracle clusterware,如果需要在服务器上重新安装Oracle clusterware(crs),首先必须把Oracle clusterware(crs)删除干净。 告警信息: 因Oracle clusterware(crs)未删除干净,将导致在安装crs时运行root.sh命令失败。原因分析:
ocr、voting文件需要重新低格(清零)才能被复用。处理过程:
约定:*操作步骤只需在其中任意一个节点执行即可,否则在所有节点都要执行 一、脚本自动删除 切换到root用户 $Su – root #cd $ORA_CRS_HOME/install1、执行rootdelete.sh脚本
# ./rootdelete.sh Getting local node name NODE = rp5470b PRKO-2006 : Invalid node name: rp5470b Stopping resources. This could take several minutes. Error while stopping resources. Possible cause: CRSD is down. Stopping Cluster Synchronization Services. Unable to communicate with the Cluster Synchronization Services daemon. Oracle CRS stack is not running. Oracle CRS stack is down now. Removing script for Oracle Cluster Ready services Updating ocr file for downgrade Cleaning up SCR settings in '/var/opt/oracle/scls_scr' Cleaning up Network socket directories 2、执行rootdeinstall.sh脚本* # ./rootdeinstall.sh Verifying existence of ocr.loc file Removing contents from OCR mirror device 2560+0 records in 2560+0 records out Removing contents from OCR device 2560+0 records in 2560+0 records out3、 使用Oracle Universal Installer卸载CRS软件
$export DISPLAY=10.69.24.124:0.0 $./runInstaller 二、手工删除1、停止所有的服务
(数据库、ASM、监听、nodeapps)2、停止CRS
#Crsctl stop crs #init.crs stop crs3、 删除与系统启动相关的文件
Sun: rm /etc/init.d/init.cssd rm /etc/init.d/init.crs rm /etc/init.d/init.crsd rm /etc/init.d/init.evmd rm /etc/rc3.d/K96init.crs rm /etc/rc3.d/S96init.crs rm -Rf /var/opt/oracle/scls_scr rm -Rf /var/opt/oracle/oprocd rm /etc/inittab.crs cp /etc/inittab.orig /etc/inittab Linux: rm /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/rc2.d/K96init.crs rm -f /etc/rc2.d/S96init.crs rm -f /etc/rc3.d/K96init.crs rm -f /etc/rc3.d/S96init.crs rm -f /etc/rc5.d/K96init.crs rm -f /etc/rc5.d/S96init.crs rm -Rf /etc/oracle/scls_scr rm -f /etc/inittab.crs cp /etc/inittab.orig /etc/inittab HP-UX: rm /sbin/init.d/init.cssd rm /sbin/init.d/init.crs rm /sbin/init.d/init.crsd rm /sbin/init.d/init.evmd rm /sbin/rc2.d/K960init.crs rm /sbin/rc2.d/K001init.crs rm /sbin/rc3.d/K960init.crs rm /sbin/rc3.d/S960init.crs rm -Rf /var/opt/oracle/scls_scr rm -Rf /var/opt/oracle/oprocd rm /etc/inittab.crs cp /etc/inittab.orig /etc/inittab HP Tru64: rm /sbin/init.d/init.cssd rm /sbin/init.d/init.crs rm /sbin/init.d/init.crsd rm /sbin/init.d/init.evmd rm /sbin/rc3.d/K96init.crs rm /sbin/rc3.d/S96init.crs rm -Rf /var/opt/oracle/scls_scr rm -Rf /var/opt/oracle/oprocd rm /etc/inittab.crs cp /etc/inittab.orig /etc/inittab IBM AIX: rm /etc/init.cssd rm /etc/init.crs rm /etc/init.crsd rm /etc/init.evmd rm /etc/rc.d/rc2.d/K96init.crs rm /etc/rc.d/rc2.d/S96init.crs rm -Rf /etc/oracle/scls_scr rm -Rf /etc/oracle/oprocd rm /etc/inittab.crs cp /etc/inittab.orig /etc/inittab 4、 Kill掉遗留的CRS进程(或重启机器) ps -ef | grep crs kill <crs pid> ps -ef | grep evm kill <evm pid> ps -ef | grep css kill <css pid> 5、 删除临时文件 rm -f /var/tmp/.oracle 或 rm -f /tmp/.oracle 6、 删除/etc/oracle/ocr.loc文件7、使用Oracle Universal Installer卸载CRS软件(参照一、3、)
8、擦除ocr和voting磁盘的内容*
dd if=/dev/zero of=/dev/vg02/rocr1 bs=8192 count=2560 dd if=/dev/zero of=/dev/vg02/rocr2 bs=8192 count=2560 dd if=/dev/zero of=/dev/vg02/rvoting1 bs=8192 count=12800 dd if=/dev/zero of=/dev/vg02/rvoting2 bs=8192 count=12800 dd if=/dev/zero of=/dev/vg02/rvoting3 bs=8192 count=12800 删除完成,可以重新安装Oracle Clusterware。 建议与总结: 在重新安装crs前,必须把原先的crs清除干净。