Relocating Grid Infrastructure Home(Single Instance)

In this post I have demonstrated step by step method to relocate 11gr2 Grid infrastructure (gi) home to another location. Below steps had performed on Single instance Grid Infra.

Please note:  I strongly recommend you to test this steps and validate.  I am not sure this is a supported action. However   I followed below steps which worked fine for me. I have implemented this in couple of environments

Environment Details
OS Version : AIX 6.1
Oracle Version  : 11.2.0.2 PSU 2
Storage  System : ASM
Old Grid  Home : /prasprd/gridinfra/grid1
New Grid Home :/prasprd/gridinfr/grid2

 

Step1

Verify Current location of GI

cat /etc/oratab

ASM:/prsprd/gridinfra/grid1:N

PPRD:/prsprd/oradb/db1:N

Step2

Stop all has stack (as root)

          /prasprd/gridinfra/grid1/bin/crsctl stop has          

Step3

Copy GI files to new destination 

cp  -R  /prasprd/gridinfra/grid1/*    /prasprd/gridinfra/grid2/

Step4

  Edit the file crsconfig_params, with new gi home path:

vi  /prasprd/gridinfra/grid2/crs/install/crsconfig_params

From    ORACLE_HOME=/prasprd/gridinfra/grid1   To    ORACLE_HOME=/prasprd/gridinfra/grid2

Step5

Edit OLR.loc file with new home

vi /etc/oracle/olr.loc

From olrconfig_loc=/prasprd/gridinfra/grid1/cdata/<servername>.olr To olrconfig_loc=/prasprd/gridinfra/grid2/cdata/<servername>.olr

From  crs_home=/prasprd/gridinfra/grid1  To     crs_home=/prasprd/gridinfra/grid2

Step 6

Take backup of crsconfig_lib.pm

cd /prasprd/gridinfra/grid2/crs/install/

cp crsconfig_lib.pm crsconfig_lib.pm.bak

Step 7

Edit following line from crsconfig_lib.pm

From     my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR

To          my @exp_func = qw(check_CRSConfig validate_olrconfig validateOCR read_file

Step 8

Now lock and relink the GI HOME as root user….

/prasprd/gridinfra/grid2/rdbms/install/rootadd_rdbms.sh

/prasprd/gridinfra/grid2/crs/install/roothas.pl –patch

Step 9

Check the CRS resources status

/prasprd/gridinfra/grid2/bin/crsctl stat res –t

Step 10

Verify Current location of GI

cat /etc/oratab

# +ASM:/prsprd/gridinfra/grid1:N

+ASM:/prsprd/gridinfra/grid2:N

PPRD:/prsprd/oradb/db1:N