Thomas Vogt’s IT Blog

knowledge is power …

Clean remove Oracle Clusterware (CRS) 10GR2 from a RHEL4

The problem with Oracle Clusterware (also known as Cluster Ready Service – CRS) is, that there is no built-in mechanism from Oracle to clean remove the Clusterware and all of it’s files distributed over the OS filesystem. The follwowing example script removes the Oracle Clusterware completely. The operating system is a RHEL4 U5.

This script has to be edited for personal use. $ORA_CRS_HOME is here under /opt/oracle.

########### script ###############

#!/bin/bash

echo

echo "Remove the Oracle Clusterware Service ?"

echo

echo "Enter y[yes] or n[no] to exit"read comit

if [ $comit == "n" ]; then

echo "Exit from Script without any change..."

exit 1

else

echo "Start to Shutdown and Remove Oracle Clusterware ..."

echo

/etc/init.d/init.evmd stop

/etc/init.d/init.evmd disable

/etc/init.d/init.cssd stop

/etc/init.d/init.cssd disable

/etc/init.d/init.crsd stop

/etc/init.d/init.crsd disable

/etc/init.d/init.crs stop

/etc/init.d/init.crs disable

rm -rf /etc/oracle /etc/oraInst.loc /etc/oratab

rm -rf /etc/init.d/init.crsd /etc/init.d/init.crs /etc/init.d/init.cssd /etc/init.d/init.evmd
rm -rf /etc/rc2.d/K96init.crs /etc/rc2.d/S96init.crs etc/rc3.d/K96init.crs \

/etc/rc3.d/S96init.crs /etc/rc4.d/K96init.crs /etc/rc4.d/S96init.crs \

/etc/rc5.d/K96init.crs /etc/rc5.d/S96init.crs /etc/rc.d/rc0.d/K96init.crs \

/etc/rc.d/rc1.d/K96init.crs /etc/rc.d/rc6.d/K96init.crs /etc/rc.d/rc4.d/K96init.crs

cp /etc/inittab.orig /etc/inittab

rm -rf /etc/inittab.crs /etc/inittab.no_crs

rm -rf /tmp/*

rm -rf /tmp/.oracle

rm -rf /usr/local/bin/dbhome /usr/local/bin/oraenv /usr/local/bin/coraenv

rm -rf /var/tmp/.oracle

rm -rf /opt/oracle/*

echo

echo "Remove on one Node the Shared Devices"

echo "rm -rf /u03/oracrs/*"

echo

fi

########### end script ###############

After running that script on a system it should be possible to reinstall Oracle Clusterware without any problems.

Advertisements

November 21, 2007 - Posted by | Clusterware, Linux, Oracle, RAC

4 Comments »

  1. Thanks Friend –

    I used this method and were able to clean clusterware ..

    Thanks …

    Comment by Jagjeet Singh | September 12, 2008 | Reply

  2. THANKS!!! this worked..ive been trying to reinstall for hours and it hasn’t been working!!!!!!

    Comment by monica jurs | September 24, 2008 | Reply

  3. Awesome it works…

    Comment by Praveen Pawar | March 21, 2011 | Reply

  4. […] 0 Times in 0 Posts Uninstall clusterware complete Clean remove Oracle Clusterware (CRS) 10GR2 from a RHEL4 and run this precheck Clusterware re-installation check.if it's successfull only, you can move […]

    Pingback by Oracle Clusterware Configuration Assistant failed - Bizzteams - Page 2 | May 25, 2012 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: