 |
|
11g Clusterware and
ASM Rolling Upgrades
Oracle 11g New Features Tips by Donald BurlesonJune 29, 2015 |
Oracle 11g New Features Tips
Oracle Clusterware can now be upgraded in a
rolling fashion, with only one node going down at a time. Performing
a rolling Clusterware upgrade is much like performing a standard
upgrade, except that only services on the nodes will be stopped that
are needed to be patched. For instance, in a four node
cluster, the nodes can be upgraded two at a time, with the first
iteration of the rolling process taking down nodes 1 and 2.
In this situation, first stop all services on
the nodes that need to be taken offline. This can be done
using the srvctl utility.
srvctl stop
instance ?d dbname ?i instance_name
srvctl stop asm ?n nodename
srvctl stop nodeapps ?n nodename
Run these commands to stop all instances, ASM,
and Clusterware on the nodes that are desired to be upgraded.
For example, for a node called ?dbprod1? with a database named ?dbp?:
srvctl stop
instance ?d dbp ?i dbp1
srvctl stop asm ?n dbprod1
srvctl stop nodeapps ?n dbprod1
Once the nodes that are to be upgraded have all
Oracle services halted, proceed with the upgrade process. On
each node being upgraded, it is important to run the
preupdate.sh script as the
root user:
$ORA_CRS_HOME/upgrade/preupdate.sh
?crshome $ORA_CRS_HOME ?crsuser crs
Note: In this example, the environment variable $ORA_CRS_HOME must
be set to the Clusterware install directory. The example
also assumes Clusterware has been installed under the ?crs? user.
Once the
preupdate.sh script has been completed, invoke the Oracle
Universal Installer (OUI) to upgrade Clusterware on the prepared
nodes. When prompted, choose only the nodes that have been
prepared for the rolling upgrade, and follow all on-screen
directions to complete the patch. This includes running
$ORA_CRS_HOME/install/rootupgrade.sh
once the software update has completed.
ASM Rolling Upgrades
Beginning in Oracle 11gR1, ASM versions can
differ for the purpose of rolling upgrades (version greater than or
equal to 11.1). Note that this is meant to be a temporary
state, and all nodes should be upgraded to the latest release as
quickly as possible.
First, fully upgrade the Clusterware to the new
release on all nodes before attempting to perform a rolling upgrade
of ASM. Once the Clusterware has been upgraded, place the ASM
instance into rolling upgrade mode with the following command:
alter
system start rolling migration to x.x.x.x.x;
Replace ?x.x.x.x.x? with the version to which
the ASM instance will be migrating. For instance:
alter system start rolling migration to 11.2.0.0.0;
At this point, it is best to shut down each
individual ASM instance, upgrade to the latest version, and start
the ASM instance to rejoin the cluster. Do this for each node
in the cluster.
It is important to note that the upgrade will
fail if there are any rebalance operations currently being
performed. This means avoiding adding or removing disks from
the ASM disk groups before performing a rolling upgrade of ASM
software.
Once the rolling upgrade is finished, stop the
rolling upgrade process with the following command:
alter
system stop rolling migration;
If, for any reason ASM must be downgraded, it
can be done in a rolling fashion with the same commands.
Downgrade to the lowest version currently in use in the cluster.
Example: There is a three node RAC
cluster. Two nodes have been upgraded to Oracle 11.2.0.0.0.
One node remains on Oracle 11.1.0.0.0. Issue the following
command on the upgraded nodes:
alter
system start rolling migration to 11.1.0.0.0;
Once this command has been run, downgrade the
patch and rejoin the cluster. End the rolling migration with
the same command previously mentioned:
alter
system stop rolling migration;
Conclusion
Oracle 11g's new features for high availability
make RAC a more manageable solution. A DBA can now properly
manage connections across their RAC instances from a multitude of
client sources, clone entire RAC configurations, and upgrade with
ease.
In addition, with tools like ADDM extending
their use to include RAC, a DBA will not be ?in the dark? when
trying to locate and fix issues that could be affecting the entire
cluster as a whole. Coupled with other new features available
in Oracle 11g, Oracle's high availability offering can be a very
powerful addition to the database architecture.