Cleaning up a failed 12cR1 RAC install

The following shows how to clean up a failed 12cR1 RAC install on Linux, so that you can launch the runInstaller executable again.

Note.  This approach assumes you have a single Oracle Home.  If you have multiple versions of Oracle installed this approach may need to be adapted.

USE AT YOUR OWN RISK.

First, log in as root and shut down the Grid Infrastructure and database on all nodes:

[root@unirac02 ~]# crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'unirac02'
CRS-2673: Attempting to stop 'ora.crsd' on 'unirac02'

< output removed to aid clarity >

CRS-2677: Stop of 'ora.cssd' on 'unirac02' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'unirac02'
CRS-2677: Stop of 'ora.gipcd' on 'unirac02' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'unirac02' has completed
CRS-4133: Oracle High Availability Services has been stopped.

Check that the CSS daemon is down.

[root@unirac02 ~]# $ORACLE_HOME/bin/crsctl stop has
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.

Next, check the ASM disks and delete them:

[root@unirac02 ~]# oracleasm listdisks
GRID01
[root@unirac02 ~]# oracleasm deletedisk GRID01
Clearing disk header: done
Dropping disk: done

Next, we need to stop the High Availability Service, the Trace File Analyzer service and ASMLib if it is running.  Stop the services and disable them:

[root@unirac02 ~]# systemctl stop oracle-ohasd.service
[root@unirac02 ~]# systemctl stop oracle-tfa.service
[root@unirac02 ~]# systemctl stop oracleasm.service

[root@unirac02 ~]# systemctl disable oracle-ohasd.service
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-ohasd.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-ohasd.service.

[root@unirac02 ~]# systemctl disable oracle-tfa.service
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.

[root@unirac02 ~]# systemctl disable oracleasm.service
Removed symlink /etc/systemd/system/multi-user.target.wants/oracleasm.service.

Next, find the location of the Oracle inventory.xml file:

[root@unirac02 ~]# cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

The inventory file will show us where Oracle installed the software:

[root@unirac02 ~]# cat /u01/app/oraInventory/ContentsXML/inventory.xml
<HOME_LIST>
<HOME NAME="OraGI12Home1" LOC="/u01/app/12.1.0/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="unirac01"/>
      <NODE NAME="unirac02"/>
   </NODE_LIST>
</HOME>

Oracle is installed at /u01/app/12.1.0/grid. We need to delete everything under /u01/app/12.1.0/grid as well as the contents of ORACLE_BASE:

[root@unirac02 ~]# echo $ORACLE_BASE
/u01/app/oracle
[root@unirac02 ~]# rm -R /u01/app/12*
[root@unirac02 ~]# rm -R /u01/app/ora*

Remove the oraInst.loc and /etc/oratab files:

[root@unirac02 ~]# rm /etc/oraInst.loc
[root@unirac02 ~]# rm /etc/oratab

Remove the shell scripts added to /usr/local/bin

[root@unirac02 ~]# rm /usr/local/bin/dbhome
[root@unirac02 ~]# rm /usr/local/bin/oraenv
[root@unirac02 ~]# rm /usr/local/bin/coraenv

Reset the ownership of /u01/app.

[root@unirac02 ~]# chown oracle:oinstall /u01/app

Repeat on each node of the RAC.  Once done you will be able to relaunch runInstaller without issue.

Advertisements

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