Skip Headers
Oracle® Grid Infrastructure Installation Guide
11g Release 2 (11.2) for Linux

Part Number E17212-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 How to Modify or Deinstall Oracle Grid Infrastructure

This chapter describes how to remove Oracle Clusterware and Oracle ASM.

This chapter contains the following topics:

See Also:

Product-specific documentation for requirements and restrictions to remove an individual product

6.1 Deciding When to Deinstall Oracle Clusterware

Remove installed components in the following situations:

6.2 Migrating Standalone Grid Infrastructure Servers to a Cluster

If you have an Oracle Database installation using Oracle Restart (that is, an Oracle Grid Infrastructure installation for a standalone server), and you want to configure that server as a cluster member node, then complete the following tasks:

  1. Inspect the Oracle Restart configuration with srvctl using the following syntax, where db_unique_name is the unique name for the database, and lsnrname is the name of the listeners:

    srvctl config database -d db_unique_name

    srvctl config service -d db_unique_name

    srvctl config listener -l lsnrname

    Write down the configuration information for the server.

  2. Change directory to Grid home/crs/install. For example:

    # cd /u01/app/11.2.0/grid/crs/install
    
  3. Stop all of the databases, services, and listeners that you discovered in step 1.

  4. If present, unmount all Oracle ACFS filesystems.

  5. Deconfigure and deinstall the Oracle Grid Infrastructure installation for a standalone server, using the following command:

    # roothas.pl -deconfig -force
    
  6. Prepare the server for Oracle Clusterware configuration, as described in this document.

  7. As the Oracle Grid Infrastructure installation owner, run Oracle Clusterware Configuration Wizard, and save and stage the response file. For example:

    $ Grid_home/crs/config/config.sh -silent -responseFile $HOME/GI.rsp
    
  8. Run root.sh for the Oracle Clusterware Configuration Wizard.

  9. Mount the Oracle Restart disk group.

  10. Enter the volenable command to enable all Oracle Restart disk group volumes.

  11. Mount all Oracle ACFS filesystems manually.

  12. Add back Oracle Clusterware services to the Oracle Clusterware home, using the information you wrote down in step 1, including adding back Oracle ACFS resources. For example:

    /u01/app/grid/product/11.2.0/grid/bin/srvctl add filesystem -d /dev/asm/db1  -g ORestartData -v db1 -m /u01/app/grid/product/11.2.0/db1 -u grid
    
  13. Add the Oracle Database for support by Oracle Grid Infrastructure for a cluster, using the configuration information you recorded in step 1. Use the following command syntax, where db_unique_name is the unique name of the database on the node, and nodename is the name of the node:

    srvctl add database -d db_unique_name -o $ORACLE_HOME -x nodename

    For example, with the database name mydb, and the service myservice, enter the following commands:

    srvctl add database -d mydb -o $ORACLE_HOME -x node1
    
    
  14. Add each service to the database, using the command srvctl add service. For example:

    srvctl add service -d mydb -s myservice
    

6.3 Relinking Oracle Grid Infrastructure for a Cluster Binaries

After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), if you need to modify the binaries, then use the following procedure, where Grid_home is the Oracle Grid Infrastructure for a Cluster home:

Caution:

Before relinking executables, you must shut down all executables that run in the Oracle home directory that you are relinking. In addition, shut down applications linked with Oracle shared libraries.

As root:

# cd Grid_home/crs/install
# perl rootcrs.pl -unlock

As the Oracle Grid Infrastructure for a Cluster owner:

$ export ORACLE_HOME=Grid_home
$ Grid_home/bin/relink

As root again:

# cd Grid_home/crs/install
# perl rootcrs.pl -patch

You must relink the Oracle Clusterware and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade.

For upgrades from previous releases, if you want to deinstall the prior release Grid home, then you must first unlock the prior release Grid home. Unlock the previous release Grid home by running the command rootcrs.pl -unlock from the previous release home. After the script has completed, you can run the deinstall command.

6.4 Changing the Oracle Grid Infrastructure Home Path

After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), if you need to change the Grid home path, then use the following procedure, where Grid_home is the Oracle Grid Infrastructure for a Cluster home:

Caution:

Before changing the Grid home, you must shut down all executables that run in the Grid home directory that you are relinking. In addition, shut down applications linked with Oracle shared libraries.
  1. As root, unlock the Grid home:

    # cd Grid_home/crs/install
    # perl rootcrs.pl -unlock
    
  2. As root, move the Grid binaries from the old Grid home location to the new Grid home location. For example, where the old Grid home is /u01/app/11.2.0/grid and the new Grid home is /u01/app/grid:

    # mv /u01/app/11.2.0/grid /u01/app/grid
    
  3. As the Oracle Grid Infrastructure for a Cluster owner:

    $ export ORACLE_HOME=Grid_home
    $ Grid_home/bin/relink
    
  4. As root again:

    # cd Grid_home/crs/install
    # perl rootcrs.pl -patch
    

You must relink the Oracle Clusterware and Oracle ASM binaries every time you move the Grid home.

6.5 Deconfiguring Oracle Clusterware Without Removing Binaries

Running the rootcrs.pl command flags -deconfig -force enables you to deconfigure Oracle Clusterware on one or more nodes without removing installed binaries. This feature is useful if you encounter an error on one or more cluster nodes during installation when running the root.sh command, such as a missing operating system package on one node. By running rootcrs.pl -deconfig -force on nodes where you encounter an installation error, you can deconfigure Oracle Clusterware on those nodes, correct the cause of the error, and then run root.sh again.

Note:

Stop any databases, services, and listeners that may be installed and running before deconfiguring Oracle Clusterware.

Caution:

Commands used in this section remove the Oracle Grid infrastructure installation for the entire cluster. If you want to remove the installation from an individual node, then refer to Oracle Clusterware Administration and Deployment Guide.

To deconfigure Oracle Clusterware:

  1. Log in as the root user on a node where you encountered an error.

  2. Change directory to Grid_home/crs/install. For example:

    # cd /u01/app/11.2.0/grid/crs/install
     
    
  3. Run rootcrs.pl with the -deconfig -force flags. For example:

    # perl rootcrs.pl -deconfig -force
    

    Repeat on other nodes as required.

  4. If you are deconfiguring Oracle Clusterware on all nodes in the cluster, then on the last node, enter the following command:

    # perl rootcrs.pl -deconfig -force -lastnode
    

    The -lastnode flag completes deconfiguration of the cluster, including the OCR and voting disks.

6.6 Removing Oracle Clusterware and Oracle ASM

The deinstall command removes Oracle Clusterware and Oracle ASM from your server. The following sections describe the command, and provide information about additional options to use the command:

6.6.1 About the Deinstallation Tool

The Deinstallation Tool (deinstall) stops Oracle software, and removes Oracle software and configuration files on the operating system. It is available in the installation media before installation, and is available in Oracle home directories after installation. It is located in the path $ORACLE_HOME/deinstall.

The command uses the following syntax, where variable content is indicated by italics:

deinstall -home complete path of Oracle home [-silent] [-checkonly] [-local]
[-paramfile complete path of input parameter property file] [-params name1=value
name2=value . . .] [-o complete path of directory for saving files] -help
 

The default method for running the deinstall tool is from the deinstall directory in the Grid home. For example:

$ cd /u01/app/11.2.0/grid/deinstall
$ ./deinstall

In addition, you can run the deinstall tool from other locations, or with a parameter file, or select other options to run the tool.

The options are:

  • -home

    Use this flag to indicate the home path of the Oracle home that you want to check or deinstall. To deinstall Oracle software using the deinstall command in the Oracle home you plan to deinstall, provide a parameter file in another location, and do not use the -home flag.

    If you run deinstall from the $ORACLE_HOME/deinstall path, then the -home flag is not required because the tool knows from which home it is being run. If you use the standalone version of the tool, then -home is mandatory.

  • -silent

    Use this flag to run the command in noninteractive mode. This option requires a properties file that contains the configuration values for the Oracle home that is being deinstalled or deconfigured.

    To create a properties file and provide the required parameters, refer to the template file deinstall.rsp.tmpl, located in the response folder. If you prefer, instead of using the template file, you can generate a properties file by using the -checkonly option to have deinstall discover information from the Oracle home that you want to deinstall and deconfigure. It generates the properties file, which you can then use with the -silent option.

  • -checkonly

    Use this flag to check the status of the Oracle software home configuration. Running the command with the checkonly flag does not remove the Oracle configuration.

  • -local

    Use this flag on a multinode environment to deconfigure Oracle software in a cluster.

    When you run deinstall with this flag, it deconfigures and deinstalls the Oracle software on the local node (the node where deinstall is run). On remote nodes, it deconfigures Oracle software, but does not deinstall the Oracle software.

  • -paramfile complete path of input parameter property file

    Use this flag to run deinstall with a parameter file in a location other than the default. When you use this flag, provide the complete path where the parameter file is located. If you are running the deinstall command from the Oracle home that you plan to deinstall, then you do not need to use the -paramfile flag.

    The default location of the parameter file depends on the location of deinstall:

    • From the installation media or stage location: $ORACLE_HOME/inventory/response.

    • From a unzipped archive file from Oracle Technology Network (OTN): /ziplocation/response.

    • After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response.

  • -params [name1=value name2=value name3=value ...]

    Use this flag with a parameter file to override one or more values in a parameter file you have already created.

  • -o complete path of directory for saving response files

    Use this flag to provide a path other than the default location where the properties file (deinstall.rsp.tmpl) is saved.

    The default location of the parameter file depends on the location of deinstall:

    • From the installation media or stage location before installation: $ORACLE_HOME/.

    • From a unzipped archive file from OTN: /ziplocation/response/.

    • After installation from the installed Oracle home: $ORACLE_HOME/deinstall/response.

  • -help

    Use the help option (-help) to obtain additional information about the command option flags.

6.6.2 Downloading The Deinstall Tool for Use with Failed Installations

You can use the Deinstallation tool (deinstall) to remove failed or incomplete installations. It is available as a separate download from the Oracle Technology Network (OTN) Web site.

To download the Deinstallation tool:

  1. Go to the following URL:

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
    
  2. Under Oracle Database 11g Release 2, click See All for the respective platform for which you want to download the Deinstallation Tool.

    The Deinstallation tool is available for download at the end of this page.

6.6.3 Deinstall Command Example for Oracle Clusterware and Oracle ASM

As the deinstall command runs, you are prompted to provide the home directory of the Oracle software that you want to remove from your system. Provide additional information as prompted.

To run the deinstall command from an Oracle Grid Infrastructure for a cluster home, enter the following command:

$ cd /u01/app/11.2.0/grid/deinstall/
$ ./deinstall 

You can run generate a deinstall parameter file by running the deinstall command using the -checkonly flag before you run the command to deinstall the home, or you can use the response file template and manually edit it to create the parameter file to use with the deinstall command.

6.6.4 Deinstallation Parameter File Example for Grid Infrastructure for a Cluster

You can run the deinstall command with the -paramfile option to use the values you specify in the parameter file. The following is an example of a parameter file for a cluster on nodes node1 and node2, in which the Oracle Grid Infrastructure for a cluster software binary owner is grid, the Oracle Grid Infrastructure home (Grid home) is in the path /u01/app/11.2.0/grid, the Oracle base (the Oracle base for Oracle Grid Infrastructure, containing Oracle ASM log files, Oracle Clusterware logs, and other administrative files) is /u01/app/11.2.0/grid/, the central Oracle Inventory home (oraInventory) is /u01/app/oraInventory, the virtual IP addresses (VIP) are 192.0.2.2 and 192.0.2.4, the local node (the node where you are running the deinstallation session from) is node1:

#Copyright (c) 2005, 2006 Oracle Corporation.  All rights reserved.
#Fri Feb 06 00:08:58 PST 2009
LOCAL_NODE=node1
HOME_TYPE=CRS
ASM_REDUNDANCY=\
ORACLE_BASE=/u01/app/11.2.0/grid/
VIP1_MASK=255.255.252.0
VOTING_DISKS=/u02/storage/grid/vdsk
SCAN_PORT=1522
silent=true
ASM_UPGRADE=false
ORA_CRS_HOME=/u01/app/11.2.0/grid
GPNPCONFIGDIR=$ORACLE_HOME
LOGDIR=/home/grid/SH/deinstall/logs/
GPNPGCONFIGDIR=$ORACLE_HOME
ORACLE_OWNER=grid
NODELIST=node1,node2
CRS_STORAGE_OPTION=2
NETWORKS="eth0"/192.0.2.1\:public,"eth1"/10.0.0.1\:cluster_interconnect
VIP1_IP=192.0.2.2
NETCFGJAR_NAME=netcfg.jar
ORA_DBA_GROUP=dba
CLUSTER_NODES=node1,node2
JREDIR=/u01/app/11.2.0/grid/jdk/jre
VIP1_IF=eth0
REMOTE_NODES=node2
VIP2_MASK=255.255.252.0
ORA_ASM_GROUP=asm
LANGUAGE_ID=AMERICAN_AMERICA.WE8ISO8859P1
CSS_LEASEDURATION=400
NODE_NAME_LIST=node1,node2
SCAN_NAME=node1scn
SHAREJAR_NAME=share.jar
HELPJAR_NAME=help4.jar
SILENT=false
local=false
INVENTORY_LOCATION=/u01/app/oraInventory
GNS_CONF=false
JEWTJAR_NAME=jewt4.jar
OCR_LOCATIONS=/u02/storage/grid/ocr
EMBASEJAR_NAME=oemlt.jar
ORACLE_HOME=/u01/app/11.2.0/grid
CRS_HOME=true
VIP2_IP=192.0.2.4
ASM_IN_HOME=n
EWTJAR_NAME=ewt3.jar
HOST_NAME_LIST=node1,node2
JLIBDIR=/u01/app/11.2.0/grid/jlib
VIP2_IF=eth0
VNDR_CLUSTER=false
CRS_NODEVIPS='node1-vip/255.255.252.0/eth0,node2-vip/255.255.252.0/eth0'
CLUSTER_NAME=node1-cluster  

Note:

Do not use quotation marks with variables except in the following cases:
  • Around addresses in CRS_NODEVIPS:

    CRS_NODEVIPS='n1-vip/255.255.252.0/eth0,n2-vip/255.255.252.0/eth0'
    
  • Around interface names in NETWORKS:

    NETWORKS="eth0"/192.0.2.1\:public,"eth1"/10.0.0.1\:cluster_interconnect VIP1_IP=192.0.2.2