Oracle grid infrastructure 12.2 installation and deinstallation process is similar to prior releases. Its very common that the installation of software may fail due to many reasons. It could be a hardware failure, human error or software bug. In such situation its very difficult to decide can we resume the installation or it needs to be reinstalled.

In case we need to deinstall the Grid Infrastructure 12.2 software then this post will be helpful for you. In this artcile we will se how we can deinstall the failed grid infrastructure software.

The following are the list of nodes on which 12.2 GI Installation failed.

1 - oranode1
2 - oranode2

Execution of root.sh script failed on oranode2 and we came to know that its due to some hardware issue and its required to deinstall the whole software.

Let’s proceed with the de-installation process:

GRID_HOME Location => /u01/122_grid

“rootcrs.pl” is the script that will be used for deinstallation of software. This script will be located under $GRID_HOME/crs/install

– We should set the perl PATH under oracle home before executing this script, else the script execution may fail with below error:

[root@oranode1 122_grid]# cd crs
[root@oranode1 crs]# cd install/
[root@oranode1 install]# perl rootcrs.pl -verbose -deconfig

Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . . ./../../perl/lib) at crsinstall.pm line 286.

BEGIN failed--compilation aborted at crsinstall.pm line 286.
Compilation failed in require at rootcrs.pl line 165.
BEGIN failed--compilation aborted at rootcrs.pl line 165.
[root@oranode1 install]# pwd
/u01/122_grid/crs/install
[root@oranode1 install]#

[root@oranode2 122_grid]# export PATH=/u01/122_grid/perl/bin:$PATH

– Now Execute the script as root user on oranode2:

[root@oranode2 install]# perl rootcrs.pl -verbose -deconfig -force
Using configuration parameter file: ./crsconfig_params


The log of current session can be found at:
/u01/122_grid/oraInventory/crsdata/oranode2/crsconfig/crsdeconfig_oranode2_2017-08-07_02-23-00PM.log
2017/08/07 14:23:11 CLSRSC-46: Error: '/u01/122_grid/oraInventory/crsdata/oranode2/crsconfig/srvmcfg1.log' does not exist
2017/08/07 14:23:11 CLSRSC-46: Error: '/u01/122_grid/oraInventory/crsdata/oranode2/crsconfig/srvmcfg1.log' does not exist
****Unable to retrieve Oracle Clusterware home.

Start Oracle Clusterware stack and try again.
2017/08/07 14:23:11 CLSRSC-180: An error occurred while executing the command '/u01/122_grid/bin/srvctl config nodeapps'
CRS-4047: No Oracle Clusterware components configured.
CRS-4000: Command Stop failed, or completed with errors.
2017/08/07 14:23:21 CLSRSC-463: The deconfiguration or downgrade script could not stop current Oracle Clusterware stack.
Failure in execution (rc=-1, 1024, 2) for command /etc/init.d/ohasd deinstall

2017/08/07 14:23:24 CLSRSC-557: Oracle Clusterware stack on this node has been successfully deconfigured. There were some errors which can be ignored.
[root@oranode2 install]#

– Execute “rootcrs.pl” on oranode1 (lastnode):

[root@oranode1 install]# export PATH=/u01/122_grid/perl/bin:$PATH
[root@oranode1 install]# perl rootcrs.pl -verbose -deconfig -force -lastnode

Using configuration parameter file: ./crsconfig_params
The log of current session can be found at:
/u01/122_grid/oraInventory/crsdata/oranode1/crsconfig/crsdeconfig_oranode1_2017-08-07_02-24-17PM.log
2017/08/07 14:24:28 CLSRSC-332: CRS resources for listeners are still configured

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oranode1'
CRS-2673: Attempting to stop 'ora.crsd' on 'oranode1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'oranode1'
CRS-2673: Attempting to stop 'ora.GDATA.dg' on 'oranode1'
CRS-2677: Stop of 'ora.GDATA.dg' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oranode1'
CRS-2677: Stop of 'ora.asm' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'oranode1'
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'oranode1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oranode1' has completed
CRS-2677: Stop of 'ora.crsd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'oranode1'
CRS-2673: Attempting to stop 'ora.crf' on 'oranode1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oranode1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oranode1'
CRS-2677: Stop of 'ora.storage' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oranode1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.crf' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.asm' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'oranode1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.evmd' on 'oranode1'
CRS-2677: Stop of 'ora.ctssd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oranode1'
CRS-2677: Stop of 'ora.cssd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oranode1'
CRS-2677: Stop of 'ora.gipcd' on 'oranode1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oranode1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'oranode1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'oranode1'
CRS-2676: Start of 'ora.mdnsd' on 'oranode1' succeeded
CRS-2676: Start of 'ora.evmd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'oranode1'
CRS-2676: Start of 'ora.gpnpd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oranode1'
CRS-2672: Attempting to start 'ora.gipcd' on 'oranode1'
CRS-2676: Start of 'ora.cssdmonitor' on 'oranode1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'oranode1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oranode1'
CRS-2676: Start of 'ora.diskmon' on 'oranode1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'oranode1'
CRS-2672: Attempting to start 'ora.ctssd' on 'oranode1'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'oranode1'
CRS-2676: Start of 'ora.crf' on 'oranode1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'oranode1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oranode1'
CRS-2676: Start of 'ora.asm' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'oranode1'
CRS-2676: Start of 'ora.storage' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'oranode1'
CRS-2676: Start of 'ora.crsd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'oranode1'
CRS-2677: Stop of 'ora.crsd' on 'oranode1' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oranode1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oranode1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oranode1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.storage' on 'oranode1'
CRS-2677: Stop of 'ora.storage' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'oranode1'
CRS-2677: Stop of 'ora.mdnsd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.asm' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'oranode1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oranode1'
CRS-2677: Stop of 'ora.cssd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'oranode1'
CRS-2677: Stop of 'ora.crf' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oranode1'
CRS-2677: Stop of 'ora.gipcd' on 'oranode1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oranode1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'oranode1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'oranode1'
CRS-2676: Start of 'ora.mdnsd' on 'oranode1' succeeded
CRS-2676: Start of 'ora.evmd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'oranode1'
CRS-2676: Start of 'ora.gpnpd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oranode1'
CRS-2672: Attempting to start 'ora.gipcd' on 'oranode1'
CRS-2676: Start of 'ora.cssdmonitor' on 'oranode1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'oranode1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'oranode1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oranode1'
CRS-2676: Start of 'ora.diskmon' on 'oranode1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oranode1' succeeded

ASM de-configuration trace file location: /u01/122_grid/oraInventory/cfgtoollogs/asmca/asmcadc_clean2017-08-07_02-29-17-PM.log
ASM Clean Configuration START
ASM Clean Configuration END
ASM instance deleted successfully. Check /u01/122_grid/oraInventory/cfgtoollogs/asmca/asmcadc_clean2017-08-07_02-29-17-PM.log for details.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oranode1'
CRS-2673: Attempting to stop 'ora.evmd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'oranode1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oranode1'
CRS-2677: Stop of 'ora.evmd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'oranode1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'oranode1' succeeded
CRS-2677: Stop of 'ora.cssd' on 'oranode1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'oranode1'
CRS-2677: Stop of 'ora.gipcd' on 'oranode1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oranode1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

2017/08/07 14:30:47 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2017/08/07 14:31:11 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2017/08/07 14:31:13 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
2017/08/07 14:31:13 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/122_grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.

[root@oranode1 install]#

– Now clear the disk header which is used in ASM:

[root@oranode1 install]# dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100

100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.0100717 s, 10.2 MB/s

[root@oranode1 install]#

– Delete ASM Disks:

[root@oranode1 install]# oracleasm listdisks
GDISK1
[root@oranode1 install]# oracleasm deletedisk GDISK1
Disk "GDISK1" defines an unmarked device
Dropping disk: done
[root@oranode1 install]#

– Scan Disks form oranode2:

[root@oranode2 install]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "GDISK1"
Scanning system for ASM disks...
[root@oranode2 install]#

– Delete GRID_HOME from oranode2:

[root@oranode2 oraInventory]# rm -rf *
[root@oranode2 122_grid]# pwd
/u01/122_grid
[root@oranode2 122_grid]# ls
[root@oranode2 122_grid]#

– Delete Inventory from both nodes:

[root@oranode1 122_grid]# cd oraInventory/
[root@oranode1 oraInventory]# ls
admin audit backup cfgtoollogs checkpoints ContentsXML crsdata diag diagsnap log logs oraInst.loc orainstRoot.sh oranode1
[root@oranode1 oraInventory]# rm -rf *
[root@oranode1 oraInventory]#

 

Conclusion

In this blogpost we have seen how to deinstall oracle 12.2 grid infrastructure software. We need the clean de-installation for using these server again for re-installation. If in case any steps in missed then there are wide chances for failure in next installation.

 

About the Author

zaheer appsdba

Syed Zaheer is a computer science engineering graduate and enthusiastic database professional with over a decade of experience in implementation and management of complex environments. He has extensive experience in managing multi-vendor UNIX operating systems, storage, databases, and applications. He is regular contributor to OTN forums (http://community.oracle.com) honored with the status of “Guru” by the Oracle Community. He is a technical writer for Oracle Technology Network and has authored a book on Oracle E-Business suite R12.2 with Apress: Practical Oracle E-Business Suite: An Implementation and Management Guide. Syed is also a B. Tech Engineering graduate in CSIT with more than 8+ Years of IT experience in Administering Multi-vendor UNIX Servers, Oracle Applications, and databases.

Start the discussion at forums.toadworld.com