Re: Question about changing GI Home

  • From: Chad Cleveland <Chad.Cleveland@xxxxxxxxxxxx>
  • To: Jeremy Schneider <jeremy.schneider@xxxxxxxxxxxxxx>
  • Date: Tue, 10 Jun 2014 13:56:06 +0000

AGREED!   The documentation is so sparse…I bet they’re thinking…no one would 
really move a cluster…it’s up, it’s running, don’t touch it!   The MOVE states 
to run step 3 in the clone process and I found another small blurb that states 
“don’t run root.sh”.   I ran through five or six different scenarios…including 
doing things Oracle says don’t do.

This is a live issue at my customer’s site and I needed to prove the method.  
They have 8 databases running on this cluster and a complete reinstall of the 
GI and restoration of the databases isn’t an option.

Per your suggestion, I’ve put my steps (truncated output) inline to this 
response.   I will be willing to send my document to any parties 
interested…Please email me directly.

Thanks and have a great day!
Chad Cleveland

Attempting to migrate GI Home following documentation at:

http://docs.oracle.com/cd/E11882_01/install.112/e41961/rem_orcl.htm#CWLIN2955

Moving /u01/app/grid/11.2.0.4 to /u01/app/grid/11.2.0.3


PROCESS:  Relocate Grid Infrastructure and bring all services online under new 
home.

Steps followed with results.


1)   Detach Grid Infrastructure home

[grid@rac01 bin]$ ./detachHome.sh -silent -local -invPtrLoc 
/u01/app/grid/11.2.0.4/oraInst.loc



2)   As Root, Unlock and move the Grid binaries from old GI Home Location to 
new GI Home Location

[root@rac01 ~]# cd /u01/app/grid/11.2.0.4/crs/install/

[root@rac01 install]# perl rootcrs.pl -unlock


 [root@rac01 /]# mv /u01/app/grid/11.2.0.4 /u01/app/grid/11.2.0.3

[root@rac01 ~]# cd /u01/app/grid/11.2.0.3/



3)   Clone the Oracle Grid Infrastructure installation, using the instructions 
provided in "Creating a Cluster by Cloning Oracle Clusterware Step 3: Run the 
clone.pl Script on Each Destination Node," in Oracle Clusterware Administration 
and Deployment 
Guide<http://docs.oracle.com/cd/E11882_01/rac.112/e41959/clonecluster.htm#CWADD92126>.

[grid@rac01 bin]$ cd /u01/app/grid/11.2.0.3/clone/bin

[grid@rac01 bin]$ pwd
/u01/app/grid/11.2.0.3/clone/bin

[grid@rac01 bin]$ perl clone.pl -silent ORACLE_BASE=/u01/app/oracle 
ORACLE_HOME=/u01/app/grid/11.2.0.3 ORACLE_HOME_NAME=Ora11g_gridinfrahome1 
INVENTORY_LOCATION=/u01/app/oraInventory -O'"CLUSTER_NODES={rac01, rac02}"' 
-O'"LOCAL_NODE=rac01"' CRS=TRUE


4)   4) Relink the Oracle Clusterware and Oracle ASM binaries

  [root@rac01 ~]# sudo su - grid
[grid@rac01 ~]$ cd $ORACLE_HOME/bin
[grid@rac01 bin]$ pwd
/u01/app/grid/11.2.0.3/bin
[grid@rac01 bin]$ ./relink
writing relink log to: /u01/app/grid/11.2.0.3/install/relink.log



5)   Start up the new home location

[grid@rac01 bin]$ sudo su - root
[root@rac01 ~]# cd /u01/app/grid/11.2.0.3/rdbms/install/
[root@rac01 install]# ./rootadd_rdbms.sh
[root@rac01 install]#

[[root@rac01 install]# pwd
/u01/app/grid/11.2.0.3/crs/install
[root@rac01 install]# perl rootcrs.pl -patch -destcrshome /u01/app/grid/11.2.0.3
Using configuration parameter file: ./crsconfig_params
/u01/app/grid/11.2.0.4/bin/crsctl does not exist to proceed stop Grid 
Infrastructure
CRS-4123: Oracle High Availability Services has been started.
[root@rac01 install]#


6)   Validate Services:


[grid@rac01 bin]$ crsctl stat res -init -t

At this time all services are backonline on Node1 and running from new grid 
location.

[grid@rac01 bin]$ ps -ef | grep crs
root     26043     1  1 13:13 ?        00:00:03 
/u01/app/grid/11.2.0.3/bin/crsd.bin reboot
grid     26888 23323  0 13:16 pts/2    00:00:00 grep crs
[grid@rac01 bin]$



7)   Repeat steps 1 through 6 on Second node.


      8) At this time the cluster is backonline and all services are running as 
we expect.  I would like to issue a reboot to validate the cluster is indeed in 
order.

****Caution**** if you reboot now, you will be in trouble.

     This is the third execution I’ve attempted with this relocate process. 
I’ve rebooted the nodes and CRS, ASM, and Databases failed to start.   No logs 
were written to the Grid Infrastructure home.   An SR was opened with Oracle to 
no avail.

I was able to fix the issue by modifying the init processes used on startup and 
shutdown.   Two files are used by the cluster and both were pointing to the old 
home.     As root, make copies and edit each to reflect the correct location of 
GI Home.  Make sure to do on both nodes.



cd /etc/init.d

[root@rac01 init.d]# ls -latr *ohasd*

-rwxr-xr-x 1 root root 6714 Jun  5 13:48 ohasd

-rwxr-xr-x 1 root root 8794 Jun  5 13:49 init.ohasd



 [root@rac01 init.d]# grep grid *ohasd*

init.ohasd:ORA_CRS_HOME=/u01/app/grid/11.2.0.4

init.ohasd:CLSECHO="/u01/app/grid/11.2.0.4/bin/clsecho"

init.ohasd:PERL="/u01/app/grid/11.2.0.4/perl/bin/perl 
-I${ORA_CRS_HOME}/perl/lib"

init.ohasd:CRSCTL=/u01/app/grid/11.2.0.4/bin/crsctl

init.ohasd:            /u01/app/grid/11.2.0.4/bin/ohasd restart &

init.ohasd

:            $SU root -c "/u01/app/grid/11.2.0.4/bin/ohasd restart &"

ohasd.:ORA_CRS_HOME=/u01/app/grid/11.2.0.4

ohasd.:CRSCTL=/u01/app/grid/11.2.0.4/bin/crsctl

[root@rac01 init.d]#



[root@rac01 init.d]# cp ohasd ohasd.chad

[root@rac01 init.d]# cp init.ohasd init.ohasd.chad



1)   Reboot and validate services are online.

[root@rac01 init.d]# reboot

Broadcast message from root@rac01.localdomain
            (/dev/pts/1) at 8:15 ...

The system is going down for reboot NOW!


Process Complete.

Other related posts: