Upgrading Db2 servers in a Pacemaker automated HADR environment

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

  1. Stop HADR:
    db2 stop hadr on db dbName
  2. 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.
  3. 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
  4. Deactivate the databases on both the primary and standby servers.
  5. Stop the Db2 instance by using db2stop command.
  6. 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).
  7. 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.
  8. Start the Db2 instance by using the db2start command.
  9. If you are completing an upgrade on a primary server, upgrade the database by using the db2 upgrade dbname command.
  10. Reinitialize HADR.
  11. 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.
  12. Validate the Pacemaker resource model by issuing the db2cm -status command and comparing it to the snapshot from step 2.