Changing the Oracle Grid Infrastructure Base Path
Use this procedure to change the Oracle Grid Infrastructure base directory after installation.
This procedure applies to Oracle Grid Infrastructure 19c Release Update (19.21) and later releases.
Note:
Before changing the Grid base, shut down all executables that run in the Grid base directory. Also, shut down any applications linked to Oracle shared libraries.
As the
rootuser, create a new Oracle base directory, then change the owner and group for the directory and files in the new Grid base.# mkdir -p /u02/app/grid # chown -R grid:oinstall /u02/app/gridStop the Oracle Clusterware stack and TFA on all cluster nodes.
# $ORACLE_HOME/bin/crsctl stop crs # tfactl stopCopy the Oracle Grid Infrastructure files from the old Grid base location to the new Grid base location, for example, from
/u01/app/gridto/u02/app/grid.# cp -pR /u01/app/grid /u02/app/gridCreate a backup of the old Oracle base to ensure new files are not created.
# mv /u01/app/grid /u01/app/grid.oldEdit the
Grid_home /crs/install/crsconfig_paramsfile using a text editor and update the ORACLE_BASE parameter to the new Oracle base on all cluster nodes.ORACLE_BASE=/u02/app/gridEdit the
Grid_home /install/orabasetabfile using a text editor and update the ORACLE_BASE parameter to the new Oracle base on all cluster nodes.ORACLE_BASE=/u01/app/grid:/u02/app/grid:OraGI23Home1:N:- Update the new Oracle base location in the
Grid_home /inventory/ContentsXML/oraclehomeproperties.xmlfile and theGrid_home /network/admin/sqlnet.orafile. Edit the
/etc/oracle/olr.locfile using a text editor and update theolrconfig_locparameter with the newORACLE_BASEpath.olrconfig_loc=/u02/app/grid/crsdata/$HOSTNAME/olr/$HOSTNAME_23.olrRestore Oracle Grid Infrastructure home file permissions on all cluster nodes.
# /u01/app/23.0.0/grid/crs/install/rootcrs.sh -initMove the AHF data directory to the new Oracle base directory.
# ahfctl movedatadir /u02/app/gridStart the Oracle Clusterware stack on all cluster nodes.
# $ORACLE_HOME/bin/crsctl start crs