Friday, November 24, 2023

Relink Oracle Grid Infrastructure RAC/Cluster Installation

After installing Oracle Grid Infrastructure for a cluster (Oracle Clusterware and Oracle ASM configured for a cluster), if you need to modify the binaries, then use the following procedure, where Grid_home is the Oracle Grid Infrastructure for a cluster home. Relink the Oracle Grid Infrastrucutre, Oracle Restart and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade.

Caution:Before relinking executables, you must shut down all executables that run in the Oracle home directory that you are relinking. In addition, shut down applications linked with Oracle shared libraries. If present, unmount all Oracle Automatic Storage Management Cluster File System (Oracle ACFS) filesystems.

You must relink the Oracle Clusterware and Oracle ASM binaries every time you apply an operating system patch or after you perform an operating system upgrade that does not replace the root file system. For an operating system upgrade that results in a new root file system, you must remove the node from the cluster and add it back into the cluster.

For upgrades from previous releases, if you want to deinstall the prior release Grid home, then you must first unlock the prior release Grid home. Unlock the previous release Grid home by running the command rootcrs.sh -unlock from the previous release home. After the script has completed, you can run the deinstall command.

 1. As root user first stop CRS

# crsctl stop crs

2. As root user, unlock the Grid Infrastructure Oracle Home (on every node) as follows:

# cd < Grid Infrastructure Oracle Home >/crs/install

# perl rootcrs.pl -unlock

Note: On 12.1/12.2/19c releases, rootcrs.sh can be used instead of rootcrs.pl. Command as 

rootcrs.sh -unlock

Note: On 12c/21c <GI_HOME>/crs/install/rootcrs.sh -prepatch can be used to stop and unlock the GI home -- clusterware must be up and running to use this option

3. As the Oracle Grid Infrastructure owner (on every node) relink the Grid Infrastructure Oracle Home as follows:

$ export ORACLE_HOME=< Grid Infrastructure Oracle Home >

$ < Grid Infrastructure Oracle Home>/bin/relink all

4. As root OS user again, please execute the next commands (on every node):

# cd < Grid Infrastructure Oracle Home >/rdbms/install/

# ./rootadd_rdbms.sh

# cd < Grid Infrastructure Oracle Home >/crs/install

# perl rootcrs.pl -patch

Note: On 12.1, use "rootcrs.sh -patch".

Note: On 12.2/21c, use "rootcrs.sh -lock" then "crsctl start crs"

Note: On 12/21c <GI_HOME>/crs/install/rootcrs.sh -postpatch can be used to start and lock the GI home

Note: CRS services (CRS, CSS ASM instances, diskgroups, listeners, DB instances, etc.) will automatically start.

5. Review relink.log file located at the following directory (to confirm or discard any error):

$ < Grid Infrastructure Oracle Home>/install/relink.log