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 running in the Grid base directory. Additionally, shut down any applications linked to Oracle shared libraries.
  1. As the root user, 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/grid
  2. Stop the Oracle Restart stack and the Trace File Analyzer (TFA).
    # $ORACLE_HOME/bin/crsctl stop has
    # tfactl stop
  3. Copy the Oracle Grid Infrastructure files from the old Grid base location to the new Grid base location, for example, from /u01/app/grid to /u02/app/grid.
    # cp -pR /u01/app/grid /u02/app/grid
  4. Create a backup of the old Oracle base to prevent the creation of new files.
    # mv /u01/app/grid /u01/app/grid.old
  5. Using a text editor, update the ORACLE_BASE parameter in the Grid_home/crs/install/crsconfig_params file to reflect the new Oracle base.
    ORACLE_BASE=/u02/app/grid
  6. Using a text editor, update the ORACLE_BASE parameter in the Grid_home/install/orabasetab file to reflect the new Oracle base.
    ORACLE_BASE=/u01/app/grid:/u02/app/grid:OraGI19Home1:N:
  7. Update the new Oracle base location in the Grid_home/inventory/ContentsXML/oraclehomeproperties.xml file and the Grid_home/network/admin/sqlnet.ora file.
  8. Using a text editor, update the olrconfig_loc parameter in the /etc/oracle/olr.loc file to reflect the new ORACLE_BASE path.
    olrconfig_loc=/u02/app/grid/crsdata/$HOSTNAME/olr/$HOSTNAME_19.olr
  9. Restore the Oracle Grid Infrastructure home file permissions.
    # /u01/app/oracle/product/19.0.0/grid/crs/install/roothas.sh -init
  10. Move the Oracle Autonomous Health Framework (AHF) data directory to the new Oracle base directory.
    # ahfctl movedatadir /u02/app/grid
  11. Start the Oracle Restart stack.
    # $ORACLE_HOME/bin/crsctl start has