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 example as a guide to detach the existing Grid home, and to attach a new Grid 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. Log in as the Oracle Grid Infrastructure installation owner (grid).

  2. Change directory to Grid_home/bin and, as root, run the command crsctl stop crs. For example:

    $ cd /u01/app/12.2.0/grid/bin
    $ ./crsctl stop crs
    
  3. As grid user, detach the existing Grid home by running the following command, where /u01/app/12.2.0/grid is the existing Grid home location:

    $ /u01/app/12.2.0/grid/oui/bin/runInstaller -silent -waitforcompletion\
    -detachHome ORACLE_HOME='/u01/app/12.2.0/grid' -local
    
  4. 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/12.2.0/grid and the new Grid home is /u01/app/12c/:

    # mkdir /u01/app/12c
    # cp -pR /u01/app/12.2.0/grid /u01/app/12c
    
  5. Unlock the destination Grid home:

    # cd /u01/app/12c/grid/crs/install
    # rootcrs.sh -unlock -dstcrshome /u01/app/12c/grid
  6. Clone the Oracle Grid Infrastructure installation, using the instructions provided in Oracle Clusterware Administration and Deployment Guide.

    When you navigate to the Grid_home/clone/bin directory and run the clone.pl script, provide values for the input parameters that provide the path information for the new Grid home.

    The Oracle Clusterware and Oracle ASM binaries are relinked when you clone the Oracle Grid Infrastructure installation.

  7. As root again, enter the following command to start up in the new home location:

    # cd /u01/app/12c/grid/crs/install
    # rootcrs.sh -move -dstcrshome /u01/app/12c/grid
  8. Repeat steps 1 through 8 on each cluster member node.

Caution:

While cloning, ensure that you do not change the Oracle home base, otherwise the move operation fails.