How to Relink Oracle 12CR2 Grid Infrastrure ( GI ) Binary

1)Change ownership of some root owned files like extjobO and jssuO, etc, because the relink script will be run as “grid’ user to change the file permissions.

Otherwise, the relink will fail from the below commands in scripts:

...
..
.
chmod 600 /u01/app/12.2.0.1/grid/bin/extjoboO )
chmod 700 /u01/app/12.2.0.1/grid/bin/extjobo
chmod 600 /u01/app/12.2.0.1/grid/bin/extjobO )
...
..
.

2) As root user:

#umask
0022

#cd /u01/app/12.2.0.1/grid/crs/install
# ./rootcrs.sh -unlock

3) As grid user:

$ cd /u01/app/12.2.0.1/grid/bin
$ relink
writing relink log to: /u01/app/12.2.0.1/grid/install/relink.log

-- Check any errors ?
$ grep -i error /u01/app/12.2.0.1/grid/install/relink.log

4) As root user:

# cd /u01/app/12.2.0.1/grid/rdbms/install
# ./rootadd_rdbms.sh


# cd /u01/app/12.2.0.1/grid/crs/install
# ./rootcrs.sh -lock
Using configuration parameter file: /u01/app/12.2.0.1/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/racnode1/crsconfig/crslock_racnode1_2018-05-25_11-58-39AM.log

5) Check cluster resources:

$/u01/app/12.2.0.1/grid/bin/crsctl stat res -t