Upgrade a Pacemaker automated HADR environment from a previous Db2
version.
Before you begin
Before upgrading, ensure that the following prerequisites are addressed:
- You have root access on Linux®.
- You have SYSADM authority.
- You run the pre-upgrade tasks for Db2 servers.
About this task
This topic explains how to upgrade automated HADR environments by reinitializing the pair.
Procedure
- Stop HADR:
db2 stop hadr on db dbName
- Take a snapshot of the existing resource model using the crm
statuscommand. The resource model needs to be re-created after the upgrade is
complete.
- As the root user, delete the Pacemaker resources by running the
db2cm
utility. The db2cm
utility is located under the
<db2_install_dir/bin>
path.
Note: Deleting the cluster resources is an irreversible step.
db2cm -delete -cluster
- Deactivate the databases on both the primary and standby servers.
- Stop the Db2 instance by using
db2stop
command.
- As root, install Db2 12.1 in a new
directory path on both servers. For more information on upgrading your Db2 server see Upgrading a Db2 server (Linux and UNIX).
- As root, upgrade the Db2 instance by running
the db2iupgrade utility from the new install path on both servers. For more information on
upgrading your instance see Upgrading Db2 11.5 and 11.1 instances.
- Start the Db2 instance by using the
db2start
command.
- If you are completing an upgrade on a primary server, upgrade the database by using the
db2 upgrade dbname
command.
- Reinitialize HADR.
- As root, export the DB2INSTANCE environment variable of the instance
name and recreate the cluster domain using the
db2cm
utility from the new install
path.
- Validate the Pacemaker resource model by issuing the
db2cm -status
command and comparing it to the snapshot from step 2.