Sunday, September 5, 2010

Real Application Cluster database upgrade from 10.2.0.1 to 10.2.0.4

Real Application Cluster database upgrade from 10.2.0.1 to 10.2.0.4

Database Version: 10.2.0.1
Operating System: Ret Hat linux 4 As & Vmware 5
Storage Type : ASM & RAW Storage
Pre-Request for upgrade:

Before upgrading any database we need take complete cold backup for database. Also we need to take backup of ORACLE_HOME, ORACLE_BASE & ORACLE_CRS_HOME

* In my case I have taken ORACLE_HOME & ORACLE_CRS_HOME backup’s using (for all nodes)

cd /u01/before_patch_backup

tar -cvf oracle_base_jul19.tar $ORACLE_BASE

tar -cvf oracle_home_jul19.tar $ORACLE_HOME

tar -cvf oracle_crs_home_jul19.tar $ORACLE_CRS_HOME

* Form storage level we need take backup’s. I used “dd” command for taking OCR & VOTING disk backups.
* Also using I have taken complete RMAN backup for my database & using “dd” command I taken RAW devices backups (I mean ASM)

PS: Make sure; before taking any backups you need to sotp your cluster don’t forgot. Using the below command you down your cluster.

[root@linux1 bin]# ./crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.


[root@linux1 bin]# ps -ef | grep pmon

root 27831 27206 0 08:26 pts/2 00:00:00 grep pmon

[root@linux1 bin]# ps -ef | grep lsn

root 27833 27206 0 08:26 pts/2 00:00:00 grep lsn


[root@linux2 bin]# ./crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.


[oracle@linux2 /]$ ps -ef | grep pmon

oracle 20613 19349 0 05:54 pts/1 00:00:00 grep pmon

[oracle@linux2 /]$

[oracle@linux2 /]$ ps -ef | grep lsn

oracle 20638 19349 0 05:54 pts/1 00:00:00 grep lsn

PS: In my test environment I don’t have separte ASM home; I’m using ORACLE_HOME itslef. If you have ASM home then you may need take backup of ASM home also.

Cluster Upgration: Now I’m going to upgrade my cluster database.

Step 1:
1. Down 10.2.0.4 patch set (Patch Nr: 6810189)
2. Extract your patch
3. From oracle user you need to exeucte “runInstaller” then you will get below screen shot.

Step 2:
Please confirm your CRS Home. Because first of all you need to upgrade cluster only (Not Oracle database or ASM Home)

Step 3:
This is TWO Nodes cluster; that’s why you will get your cluster nodes names list.

Step 4:
This is pre-request checking steps; in case any thing wrong here you will come to know all the details.

Step 5:
Once successfully completed your pre-request then continue the patch installation on cluster.

Step 6:
After succesfully installation you may need execute the below script from root user (in all nodes you need follow same steps)

/u01/oracle/product/10.2.0/crs/bin/crsctl stop crs
/u01/oracle/product/10.2.0/crs/install/root102.sh

Form Node 1:

[root@linux1 bin]# ./crsctl stop crs

Stopping resources.

Error while stopping resources. Possible cause: CRSD is down.

Stopping CSSD.

Unable to communicate with the CSS daemon.

[root@linux1 bin]# cd ..

[root@linux1 crs]# cd install

[root@linux1 install]# ./root102.sh

Creating pre-patch directory for saving pre-patch clusterware files

Completed patching clusterware files to /u01/app/oracle/product/10.2.0/crs

Relinking some shared libraries.

Relinking of patched files is complete.

WARNING: directory '/u01/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/oracle/product' is not owned by root

WARNING: directory '/u01/oracle' is not owned by root

WARNING: directory '/u01' is not owned by root

Preparing to recopy patched init and RC scripts.

Recopying init and RC scripts.

Startup will be queued to init within 30 seconds.

Starting up the CRS daemons.

Waiting for the patched CRS daemons to start.

This may take a while on some systems.

.

.

.

.

10204 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 1: linux1 linux1-priv linux1

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

clscfg -upgrade completed successfully


From Node 2:

[root@linux2 bin]# ./crsctl stop crs

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@linux2 bin]# cd ../install

[root@linux2 install]# ./root102.sh >> rootexecteation2.txt &

[1] 10282

[root@linux2 install]# tail -f rootexecteation2.txt

WARNING: directory '/u01/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/oracle/product' is not owned by root

WARNING: directory '/u01/oracle' is not owned by root

WARNING: directory '/u01' is not owned by root

Preparing to recopy patched init and RC scripts.

Recopying init and RC scripts.

Startup will be queued to init within 30 seconds.

/etc/profile: line 55: ulimit: open files: cannot modify limit: Operation not permitted

/home/oracle/.bash_profile: line 30: ulimit: open files: cannot modify limit: Operation not

permitted

Starting up the CRS daemons.

Waiting for the patched CRS daemons to start.

This may take a while on some systems.

.

.

10204 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 2: linux2 linux2-priv linux2

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

clscfg -upgrade completed successfully


Cluster Status

[root@linux2 install]# cd ../bin

[root@linux2 bin]# ./crs_stat -t

Name Type Target State Host

------------------------------------------------------------

ora.devdb.db application ONLINE OFFLINE

ora....b1.inst application OFFLINE OFFLINE

ora....b2.inst application ONLINE OFFLINE

ora...._taf.cs application OFFLINE OFFLINE

ora....db1.srv application OFFLINE OFFLINE

ora....db2.srv application OFFLINE OFFLINE

ora....SM1.asm application OFFLINE OFFLINE

ora....X1.lsnr application OFFLINE OFFLINE

ora.linux1.gsd application ONLINE ONLINE linux1

ora.linux1.ons application ONLINE ONLINE linux1

ora.linux1.vip application ONLINE ONLINE linux1

ora....SM2.asm application ONLINE ONLINE linux2

ora....X2.lsnr application ONLINE ONLINE linux2

ora.linux2.gsd application ONLINE OFFLINE

ora.linux2.ons application ONLINE ONLINE linux2

ora.linux2.vip application ONLINE ONLINE linux2

I am having some problem in Node2 that’s why GSD is down in node2.

No comments: