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:
Note:
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 (
grid
). -
Change directory to Grid_home
/bin
and, asroot
, run the commandcrsctl stop crs
. For example:$ cd /u01/app/19.0.0/grid/bin $ ./crsctl stop crs
-
As
grid
user, detach the existing Grid home by running the following command, where/u01/app/19.0.0/grid
is the existing Grid home location:$ /u01/app/19.0.0/grid/oui/bin/runInstaller -silent -waitforcompletion\ -detachHome ORACLE_HOME='/u01/app/19.0.0/grid' -local
-
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/19.0.0/grid
and the new Grid home is/u01/app/19c
:# mkdir /u01/app/19c # cp -pR /u01/app/19.0.0/grid /u01/app/19c
-
Unlock the destination Grid home:
# cd /u01/app/19c/grid/crs/install # ./rootcrs.sh -unlock -dstcrshome /u01/app/19c/grid
-
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 theclone.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.
-
As
root
again, enter the following command to start up in the new home location:# cd /u01/app/19c/grid/crs/install # ./rootcrs.sh -move -dstcrshome /u01/app/19c/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.Parent topic: Removing Oracle Database Software