Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1629856.1
Update Date:2016-08-23
Keywords:

Solution Type  Technical Instruction Sure

Solution  1629856.1 :   ODA Old Grid Home Is Not Removed After Grid Infrastructure Upgrade  


Related Items
  • Oracle Database Appliance X4-2
  •  
  • Oracle Database Appliance Software
  •  
  • Oracle Database Appliance X3-2
  •  
Related Categories
  • PLA-Support>Eng Systems>Exadata/ODA/SSC>Oracle Database Appliance>DB: ODA_EST
  •  




Created from <SR 3-8583646591>

Applies to:

Oracle Database Appliance X3-2 - Version All Versions to All Versions [Release All Releases]
Oracle Database Appliance X4-2 - Version All Versions to All Versions [Release All Releases]
Oracle Database Appliance Software - Version 2.8.0.0 to 12.1.2.3 [Release 2.8 to 12.1]
Information in this document applies to any platform.

Goal

Grid Oracle Home is not removed after grid infrastructure upgrade

Examples

ODA 2.8:           Grid Oracle Home 11.2.0.3 was not removed after grid infrastructure upgrade to ODA 2.8


[grid@svr-oda1 app]$ pwd

  /u01/app


[grid@svr-oda1 app]$ ls

  11.2.0.3 11.2.0.4 em12c grid oracle oraInventory
 

Solution

DO NOT simply manually delete that directory structure as it does not modify the oraInventory to remove the old entries. 

  • Leaving the previously used GRID home is the expected behavior of all Out-of-Place upgrades.
  • The out of place upgrades are the default in ODA releases >= 2.8.
  • The intent is to keep the old home in case a downgrade to the previous version if for some reason if there are issues with the new ORACLE_HOME.
  • After the Grid Infrastructure upgrade is running from the new home and verified, the old ORACLE_HOME for the Grid Infrastructure can be de-installed.

 

To de-install the old Grid Infrastructure home

First of all: For upgrades from previous releases, if you want to deinstall the previous release Grid home, then as the root user, you must manually change the permissions of the previous release Grid home, and then run the deinstall command.

For example:

# chown -R grid:oinstall /u01/app/grid/11.2.0
# chmod -R 775 /u01/app/grid/11.2.0

For the above 11.2.0.x example,    /u01/app/grid/11.2.0 is the previous release Grid home.

: Make sure the de-install utility is available on the system.

You may need to download the de-install utility based on the current GI Version. 

Example Download and unzip p13390677_112040_Linux-x86-64_7of7.zip)

DEINSTALL CHECK

1: Run the de-install check only to verify no issues 
 

$./deinstall -checkonly  /u01/app/11.2.0.3/grid/    --  Checks the old Grid Infrastructure 11.2.0.3 home to see it is ok for removal.

Another version that you may want to remove outdates GRID homes is as of 12.1.0.2 and higher
 

Worked Example on 12.1.0.2 - for removing 11.2.0.4/grid after installing 12.1.0.2

                [oracle@oda1 deinstall]$ su - grid
                Password:

[grid@oda1 ~]$           cd /u01/app/11.2.0.4/grid/deinstall

[grid@oda1 deinstall]$  ./deinstall -checkonly /u01/app/11.2.0.4/grid/

Checking for required files and bootstrapping ...
Please wait ...

Location of logs /u01/app/oraInventory/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


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

Checking for existence of the Oracle home location /u01/app/11.2.0.4/grid

Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster

  Oracle Base selected for deinstall is: /u01/app/grid

Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/12.1.0.2/grid

The following nodes are part of this cluster: odarm1-base,odarm2-base
Checking for sufficient temp space availability on node(s) : 'odarm1-base,odarm2-base'

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2015-01-12_02-58-03-PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2015-01-12_02-58-04-PM.log

ASM was not detected in the Oracle Home

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


####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/12.1.0.2/grid

The cluster node(s) on which the Oracle home deinstallation will be performed are:odarm1-base,odarm2-base

Oracle Home selected for deinstall is: /u01/app/11.2.0.4/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/12.1.0.2/grid)

ASM was not detected in the Oracle Home

A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2015-01-12_02-57-56-PM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2015-01-12_02-57-56-PM.err'

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

[grid@odarm1-base deinstall]$

 

DEINSTALL

3: If the de-install check shows no issues, then de-install the old Grid Infrastructure Home

$ ./deinstall -home /u01/app/11.2.0.3/grid/                  >>> Removes / uninstalls the old GI home

 

DEBUGGING ERRORS, POSSIBLE REASONs and RESOLUTIONs 

 

Oracle home not owned by user.


[root@oda1-base deinstall]# su - oracle
[oracle@oda1-base ~]$ cd /u01/app/11.2.0.4/grid/deinstall
[oracle@oda1-base deinstall]$ ./deinstall -checkonly

ERROR: Oracle home not owned by user.

 

The user running the deinstall tool is not the same as owner of Oracle home based on inventory ownership.

You must run this tool as the same user who installed the software.

$ ./deinstall -checkonly /u01/app/11.2.0.3/grid/    << This will Check the old Grid Infrastructure home to see it is ok for removal.

 

Option home requires an argument

[grid@oda1 deinstall]$ ./deinstall -checkonly -home <path/home>              --- replace "dash home" wording aka"-home" and add the path to the Home

                  e.g../deinstall -checkonly  /u01/app/11.2.0.4/grid/       
                   or ./deinstall /u01/app/11.2.0.3/grid/

   Checking for required files and bootstrapping ...
   Please wait ...
   Option home requires an argument

  ---

Remove the -home parameter

$ ./deinstall -checkonly /u01/app/11.2.0.3/grid/         -- Note: Remove the -home parameter if you are cd'ed to the ORACLE_HOME:

 

Potential problem scenario and resolution

I think the confusion is how the error message text points to "ERROR: -home must not be set" leading us to believe it is the ENV:
I believe is is actually the syntax that needs to remove the "..-home " from the command instead from the location of the Home

e.g. [grid@oda1  deinstall]$ cd /u01/app/11.2.0.4/grid
       [grid@oda1  deinstall]$ ./deinstall /u01/app/11.2.0.4/grid

ERROR: -home must not be set for a deinstall running from within an ORACLE_HOME.

      [grid@oda1 ~]$ cd /u01/app/11.2.0.3/grid/deinstall
      [grid@oda1 ~]$ deinstall]$ ./deinstall -checkonly /u01/app/11.2.0.3/grid/

Wrong

      [grid@oda1 ~]$ cd /u01/app/11.2.0.3/grid/deinstall
      [grid@oda1 deinstall]$ ./deinstall -home /u01/app/11.2.0.3/grid/   <<<<<<< remove the -home portion of the syntax

Checking for required files and bootstrapping ...
Please wait ...

ERROR: -home must not be set for a deinstall running from within an ORACLE_HOME.
Deinstall of the current home is assumed.

Correct

      [grid@oda1 ~]$  cd /u01/app/11.2.0.3/grid/deinstall
      [grid@oda1 ~]$  deinstall]$ ./deinstall /u01/app/11.2.0.3/grid       < Remove the -home portion of the syntax
                                                                                                                       and use the actual path for the home to be removed

 

 ---

Logged on as the wrong user

[root@oda1 deinstall]# ./deinstall -checkonly -home
   You must not be logged in as root to run ./deinstall.
   Log in as Oracle user and rerun ./deinstall.

This is misleading

[oracle@oda1 grid]$ cd deinstall
[oracle@oda1 deinstall]$ ./deinstall checkonly -home

ERROR: Oracle home not owned by user.
The user running the deinstall tool is not the same as owner of Oracle home
based on inventory ownership.

You must run this tool as the same user who installed the software.

[oracle@oda1 deinstall]$ ./deinstall checkonly /u01/app/11.2.0.4/grid

---

[root@odarm1-base deinstall]# su - grid
[grid@odarm1-base ~]$ cd /u01/app/11.2.0.4/grid/deinstall

[grid@odarm1-base deinstall]$ ./deinstall -checkonly -home

Checking for required files and bootstrapping ...
Please wait ...
Option home requires an argument

 -home must not be set for a deinstall running from within an ORACLE_HOME.



[grid@odarm1-base deinstall]$ ./deinstall -checkonly -home /u01/app/11.2.0.4

Checking for required files and bootstrapping ...
Please wait ...

ERROR: -home must not be set for a deinstall running from within an ORACLE_HOME.
Deinstall of the current home is assumed.

 

** Do not use the unlock option provided in generic CRS notes

 

DO NOT simply manually delete that directory structure as it does not modify the oraInventory to remove the old entries.

For more details, refer to:

Oracle® Database Installation Guide
11g Release 2 (11.2) for Linux
E47689-07


 


Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback