Deinstalling previous Grid Infrastructure Home after an upgrade to 18c

the-creative-exchange-682637-unsplash

(Picture by The Creative Exchange, via Unsplash)

Yesterday, I upgraded my lab Grid Infrastructure version 12.1 to version 18c on Oracle Linux Server release 7. Everything went (approximately) OK, but this is not the subject of interest today. Afterwards, I wanted to get rid of the old 12.1 Grid Infrastructure home with the deinstall utility.

First, as root, I changed permission and ownership of the former Grid Infrastructure home, according to the documentation :

# chmod -R 755 /u01/app/12.1.0.2/grid
# chown -R oracle /u01/app/12.1.0.2/grid
# chown oracle /u01/app/12.1.0.2

Then, as the Grid Infrastructure owner, I carefuly launched the deinstall utility with -checkonly option :

# cd /u01/app/12.1.0.2/grid/deinstall

# ./deinstall -checkonly
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /my/old/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##

Remote nodes on which old homes will be deleted: mynode2

Checking for existence of the Oracle home location /u01/app/12.1.0.2/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
Active Remote Nodes are mynode2
Checking for sufficient temp space availability on node(s) : 'mynode1,mynode2'

Failed to check for sufficient temp space.
Additional details:


Exited from program.

The temp space check task has failed due to the above errors. Retry after corrective measures are taken.

I encountered the following error : Failed to check for sufficient temp space.. As I did not want to perform any useless operation regarding this temporary space (it is a lab, after all), I decided to use option -tmpdir to use another temporary directory. This directory was actually a VirtualBox shared folder on my virtual machines, that had enough free space. Please be aware that you might encounter symbolic links (symlinks) issues if you use a shared folder in VirtualBox like I did. More information about shared folders and symlinks can be found in VirtualBox user manual.

# ./deinstall -checkonly -tmpdir /an/other/temp/directory -local
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/12.1.0.2/grid/
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
Checking for sufficient temp space availability on node(s) : 'mynode1'

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2018-09-29_10-17-35AM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2018-09-29_10-17-36-AM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2018-09-29_10-17-36-AM.log

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2018-09-29_10-17-36-AM.log

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
The cluster node(s) on which the Oracle home deinstallation will be performed are:mynode1
Oracle Home selected for deinstall is: /u01/app/12.1.0.2/grid/
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/18_0_0_0/grid)
Option -local will not modify any ASM configuration.
Location of response file generated: '/media/sf_Oracle_Distribs/deinstall2018-09-29_10-15-51AM/response/deinstall_OraGI12Home1.rsp'
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-17-29-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-17-29-AM.err'

############# ORACLE DECONFIG TOOL END #############

Now, everything looks fine ! Let’s do it for real !

# ./deinstall -tmpdir /an/other/temp/directory -local
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/12.1.0.2/grid/
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
Checking for sufficient temp space availability on node(s) : 'mynode1'

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2018-09-29_10-17-35AM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2018-09-29_10-17-36-AM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2018-09-29_10-17-36-AM.log

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2018-09-29_10-17-36-AM.log

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
The cluster node(s) on which the Oracle home deinstallation will be performed are:mynode1
Oracle Home selected for deinstall is: /u01/app/12.1.0.2/grid/
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/18_0_0_0/grid)
Option -local will not modify any ASM configuration.
Location of response file generated: '/media/sf_Oracle_Distribs/deinstall2018-09-29_10-15-51AM/response/deinstall_OraGI12Home1.rsp'
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-17-29-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-17-29-AM.err'

############# ORACLE DECONFIG TOOL END #############


# [ oracle@mynode1:/u01/app/12.1.0.2/grid/deinstall [10:17:51] [OH not set SID="not set"] 0 ] #
#

# [ oracle@mynode1:/u01/app/12.1.0.2/grid/deinstall [10:18:13] [OH not set SID="not set"] 0 ] #
# ./deinstall -tmpdir /media/sf_Oracle_Distribs -local
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Checking for existence of the Oracle home location /u01/app/12.1.0.2/grid/
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
Checking for sufficient temp space availability on node(s) : 'mynode1'

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2018-09-29_10-20-19AM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2018-09-29_10-20-19-AM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2018-09-29_10-20-19-AM.log

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2018-09-29_10-20-20-AM.log

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/18_0_0_0/grid
The following nodes are part of this cluster: mynode1,mynode2
The cluster node(s) on which the Oracle home deinstallation will be performed are:mynode1
Oracle Home selected for deinstall is: /u01/app/12.1.0.2/grid/
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/18_0_0_0/grid)
Option -local will not modify any ASM configuration.
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-20-14-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-20-14-AM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2018-09-29_10-21-12-AM.log
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2018-09-29_10-21-12-AM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2018-09-29_10-21-12-AM.log

Network Configuration clean config END


######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
The home being deconfigured is NOT a configured Grid Infrastructure home (/u01/app/18_0_0_0/grid)
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /media/sf_Oracle_Distribs/deinstall2018-09-29_10-18-20AM/response/deinstall_2018-09-29_10-20-14-AM.rsp
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-20-14-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2018-09-29_10-20-14-AM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to mynode1
Setting CLUSTER_NODES to mynode1
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /media/sf_Oracle_Distribs/deinstall2018-09-29_10-18-20AM/oraInst.loc
Setting oracle.installer.local to true

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/12.1.0.2/grid/' from the central inventory on the local node : Done

Delete directory '/u01/app/12.1.0.2/grid/' on the local node : Done

The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/oracle/product/12.1.0/dbhome_1'.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/media/sf_Oracle_Distribs/deinstall2018-09-29_10-18-20AM' on node 'mynode1'

## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/12.1.0.2/grid/' from the central inventory on the local node.
Successfully deleted directory '/u01/app/12.1.0.2/grid/' on the local node.
Oracle Universal Installer cleanup was successful.

For complete clean up of Oracle Clusterware software from the system, deinstall the following old clusterware home(s). Refer to Clusterware Install guide of respective old release for details.
    /u01/app/18_0_0_0/grid on nodes : mynode1
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

My lab nodes are clean and I saved up a few gigabytes 🙂

EDIT : To follow up on Patrick Jolliffe’s comment on Twitter, please double-check which home is about to be deinstalled (for example in the ouput : Oracle Home selected for deinstall is: /u01/app/12.1.0.2/grid/) to avoid unpleasant surprise. And as Patrick suggested, you can also deinstall the old home by detaching it from inventory and then manually deleting the directory, as described in Doc ID 1346305.1.

1 thought on “Deinstalling previous Grid Infrastructure Home after an upgrade to 18c

  1. Pingback: Deinstalling Oracle Database 12.2.0.1 – Upgrade your Database - NOW!

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 )

Connecting to %s