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:
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.
Log in as the Oracle Grid Infrastructure installation owner (
Change directory to Grid_home
root, run the command
crsctl stop crs. For example:
$ cd /u01/app/18.0.0/grid/bin $ ./crsctl stop crs
griduser, detach the existing Grid home by running the following command, where
/u01/app/18.0.0/gridis the existing Grid home location:
$ /u01/app/18.0.0/grid/oui/bin/runInstaller -silent -waitforcompletion\ -detachHome ORACLE_HOME='/u01/app/18.0.0/grid' -local
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/18.0.0/gridand the new Grid home is
# mkdir /u01/app/18c # cp -pR /u01/app/18.0.0/grid /u01/app/18c
Unlock the destination Grid home:
# cd /u01/app/18c/grid/crs/install # ./rootcrs.sh -unlock -dstcrshome /u01/app/18c/grid
Clone the Oracle Grid Infrastructure installation, using the instructions provided in Oracle Clusterware Administration and Deployment Guide.
When you navigate to the
/clone/bindirectory and run the
clone.plscript, 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.
rootagain, enter the following command to start up in the new home location:
# cd /u01/app/18c/grid/crs/install # ./rootcrs.sh -move -dstcrshome /u01/app/18c/grid
Repeat steps 1 through 8 on each cluster member node.
Note:While cloning, ensure that you do not change the Oracle home base, otherwise the move operation fails.