Some times we have to do a maual cleanup of failed CRS installation or some old CRS installation that was done. We have a automated way of cleaning up CRS as show below
1) Run rootdelete.sh script present in $ORA_CRS_HOME/install directory
2) Run rootdeinstall.sh script present in $ORA_CRS_HOME/install directory
If you have unknowingly deleted the CRS HOME before running the above scripts then you can follow below procedure to manually clean up the CRS.
Manual Cleanup of CRS on Linux
1. Remove following files as root user on ALL NODES IN CLUSTER
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
2. If they are not already down then kill off EVM, CRS and CSS process as root user on ALL NODES
ps -ef | grep crs kill <crs pid> ps -ef | grep evm kill <evm pid> ps -ef | grep css kill <css pid>
3. Remove the files in /var/tmp/.oracle or /tmp/.oracle on ALL NODES
rm -f /var/tmp/.oracle/* or rm -f /tmp/.oracle/*
4. Remove the ocr.loc at /etc/oracle on ALL NODES
5. De-install the CRS home in the Oracle Universal Installer
This is to remove the CRS home from inventory. Installer may not be able to remove the files in the slot as CRS home is already deleted, but it will clean up the inventory.
6. Remove the CRS install location on ALL NODES
In case you have not removed the CRS install directory, please do so.
7. Remove OCR and Voting disk from shared location from any 1 node
Once above manual steps are done, the hosts are cleaned up and ready for next CRS installation.
Hope this helps !!
References:
Metalink Note ID : 239998.1
Very good tip and article. Thanks for sharing.
Last two lines are not right. where are you copying that inittab.orig. Please fix it before someone deletes it
rm -f /etc/inittab.crs
cp /etc/inittab.orig /etc/inittab