Welcome to www.freeoraclehelp.com Got questions? Post comments Like the facebook page to get instant updates. Thank you!!!
Total Pageviews

Oracle 11gR2 RAC Upgrade from 10gR2 RAC on Linux

This article explains step by step RAC upgrade procedure to upgrade Oracle 10gR2 (10.2.0.4) Real Application Cluster(RAC) to Oracle 11gR2 (11.2.0.2) RAC. This procedure cannot be used for a fresh RAC installation. The following are important notes:

  • CRS has to be upgraded first, followed by the database upgrade
  • Oracle 11gR2 RAC has brought in a some good changes. Oracle 10g CRS and ASM homes are no more.  Both CRS and ASM are installed in to the same home, GRID Infrastructure home. SCAN is introduced.
  • In 11g, OCR and Voting disks can be stored in ASM Disk group
  • RAW Devices for OCR and Voting disk are still supported on upgraded RAC environments. This is not an option during a fresh install.
  • New user for CRS and ASM administration is introduced. ie. grid user. This is more of a role management for storage guys. It has to be the same OS user in Oracle 10g.
  • However, since this is an upgrade, I had to retain the same user for grid. Of course, during fresh installation, you can still run both Grid and Oracle database with the same user.. but oracle recommends a separate user for grid.
  • Grid home should not be under grid base
  • Oracle database home should be under Oracle base.
  • 11gR2 introduced a multicasting mechanism for cluster communications.  Verify if your network supports multicast before the upgrade: Refer to Oracle Note: 1212703.1
  • Starting with 11gR2, we don’t have to install base release and apply patch sets. For example: In Oracle 10g, we have to install 10.2.0 and then apply 10.2.0.4 patch set on top of 10.2.0. But now, we can directly install 11.2.0.2 from the media.  This may not be found in OTN, check for the patch: 10098816 in My Oracle Support.
  • You can opt to run ASMCA after grid installation.. I did not opt for it, because that's mainly for rolling upgrade. There is no rolling upgrade from 10.2.0.4, so I don't see any benefit to run ASMCA manually after the grid installation.
Make sure your database version is okay to go to 11gR2:
  • Direct upgrade to Oracle Database 11gR2 is supported from 9.2.0.8+, 10.1.0.5+,  10.2.0.2+, and 11.1.0.6+
  • 9.0.1.3 (or earlier) -> 9.0.1.4 -> 10.2.0.4 -> 11.2
  • 9.2.0.3 (or earlier) -> 9.2.0.8 -> 11.2
So, my current 10.2.0.4 RAC database can be directly upgraded to 11gR2. I am upgrading the Oracle 10gR2 RAC Installation, performed in http://www.freeoraclehelp.com/2011/09/oracle-10g-rac-installation-on-linux.html

The following are the homes I have used:
10g CRS home :   /oracle/product/10.2.0/crs
10g ASM home :  /oracle/product/10.2.0/asm
10g Database home : /oracle/product/10.2.0/rdbms

11g Grid base:/oracle/product/11.2.0/base
11g Grid Home: /oracle/product/11.2.0/11.2.0/grid
11g Database base: /oracle/product/11.2.0/base
11g Database home: /oracle/product/11.2.0/database

I have used the same location for grid and oracle bases. This wasn’t a problem for me, since I do not use a separate user for Grid.
More information on SCAN Setup: http://www.freeoraclehelp.com/2011/09/11gr2-rac-scan-dns-bind-configuration.html

Pre-upgrade tasks


Backup the database:
CONFIGURE CONTROLFILE AUTOBACKUP ON; 
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/backups/preupgrade/%F';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/backups/preupgrade/snapcf_oid.f'; 

startup mount;
RUN
{
  ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/oracle/backups/preupgrade/%D%M%U'; 
  backup database include current controlfile;
} 
Check the current OCR and voting locations:
[root@rac1 ~]# /oracle/product/10.2.0/crs/bin/crsctl query css votedisk
 0.     0    /dev/raw/raw3
 1.     0    /dev/raw/raw4
 2.     0    /dev/raw/raw5

located 3 votedisk(s).
[root@rac1 ~]# 

[root@rac1 ~]# /oracle/product/10.2.0/crs/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     200560
         Used space (kbytes)      :       4332
         Available space (kbytes) :     196228
         ID                       : 1685195531
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

[crs@rac1 ~]$ocrconfig -showbackup     
rac1     2011/09/08 22:46:48     /oracle/product/10.2.0/crs/cdata/crs
rac1     2011/09/07 18:05:51     /oracle/product/10.2.0/crs/cdata/crs
rac1     2011/09/07 18:05:51     /oracle/product/10.2.0/crs/cdata/crs
rac1     2011/09/07 18:05:51     /oracle/product/10.2.0/crs/cdata/crs
[crs@rac1 ~]$

[root@rac1 ~]# cat /etc/sysconfig/rawdevices
#OCR
/dev/raw/raw1 /dev/xvdc1
/dev/raw/raw2 /dev/xvdd1
#Voting
/dev/raw/raw3 /dev/xvde1
/dev/raw/raw4 /dev/xvdf1
/dev/raw/raw5 /dev/xvdg1
#Data
/dev/raw/raw6 /dev/xvdh1
/dev/raw/raw7 /dev/xvdi1
[root@rac1 ~]#

Backup the OCR file
# /oracle/product/10.2.0/crs/bin/ocrconfig -export /oracle/product/10.2.0/crs/cdata/crs/preupg.dmp

Backup the voting disk:
dd if=/dev/raw/raw3 of=/oracle/product/10.2.0/crs/cdata/crs/preupg_votingdisk1
Run cluvfy script from the grid directory and address all the problems:
/dumps/Database/11gR2/grid/runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose |tee cluvy_fixed.log
The following are the prerequisites I had to fix:
# yum install oracleasm-support oracleasmlib oracleasm-`uname -r`

# tail /etc/security/limits.conf
# Oracle 11g limits for oracle user
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

# cat /etc/sysctl.ctl
kernel.shmall = 2097152
kernel.shmmax = 2147551232
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878 
kernel.msgmax = 8192 
kernel.msgmnb = 65535
xen.independent_wallclock=1
fs.aio-max-nr = 1048576
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

# grep OPTIONS /etc/sysconfig/ntpd
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid -x"
# /sbin/service ntpd restart


Upgrade CRS + ASM


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Run root.sh on rac1 first and then on rac2:
[root@rac1 grid]# /oracle/product/11.2.0/11.2.0/grid/rootupgrade.sh 
Running Oracle 11g root script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/product/11.2.0/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE 
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Failure in execution (rc=-1, 0, No such file or directory) for command 1 oclumon stop all
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Linux 2.4'
ACFS-9201: Not Supported
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Linux 2.4'
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac1 grid]# 


[root@rac2 grid]# ./rootupgrade.sh 
Running Oracle 11g root script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/product/11.2.0/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE 
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
OLR initialization - successful
Failure in execution (rc=-1, 0, No such file or directory) for command 1 oclumon stop all
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Linux 2.4'
ACFS-9201: Not Supported
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Linux 2.4'
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Start upgrade invoked..
Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
Started to upgrade the OCR.
Started to upgrade the CSS.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Oracle Clusterware operating version was successfully set to 11.2.0.2.0
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Linux 2.4'
ACFS-9201: Not Supported
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@rac2 grid]# 
Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade
Cluster verification utility failed as NTP Server IP varied from node1 to node2. This wasn't a problem as I have used the virtual name of NTP server from the pool and I have verified the time difference.


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Install the database software

Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


Oracle 11gR2 RAC Upgrade


I have selected software only for the database installation.. but you may want to select upgrade an existing database option. OUI needs your database in /etc/oratab and the current global inventory should have 10.2.0 installation home listed.
You may want to use DBUA or manual $ORACLE_HOME/rdbms/admin/catupgrd.sql to upgrade the database.

After the upgrade, please refer to http://www.freeoraclehelp.com/2011/09/convert-raw-devices-to-asmlib-move-ocr.html to know how to migrate Raw devices to ASMLib disks.

Related Posts