Upgrading Db2 pureScale instances

As part of the overall process of upgrading your Db2 database server to Db2 version 12.1, you must upgrade your pureScale instances.

Before you begin

Ensure that your instance meets the following conditions before upgrading:

Note:
  • Before you run the db2iupgrade command, complete the following steps:
    • Verify that the instance is and your databases are ready for Db2 upgrade. This step is important in Db2 pureScale environments because the db2ckupgrade command might return an error in one member and cause the instance upgrade to fail. The instance upgrade also fails with discontinued instance settings are found. Refer to Verifying that your databases are ready for upgrade.
    • Gather pre-upgrade diagnostic information to help diagnose any problem that might occur after the upgrade. For details, see Gathering pre-upgrade diagnostic information.

Procedure

To manually upgrade your existing instances to Db2 version 12.1 using the db2iupgrade command:

  1. Log on to the Db2 server with root user authority.
  2. Stop the Db2 pureScale instance by issuing the db2stop command. If you do not stop the instance before issuing the db2iupgrade command, your instance upgrade might fail.
  3. Upgrade your existing instances by issuing the db2iupgrade command from the target Db2 version 12.1 copy location.
       $DB2DIR/instance/db2iupgrade -d -g [ -u fencedID ] InstName

    where DB2DIR is set to the location that you specified during Db2 version 12.1 installation, -g is the default parameter that upgrades all the members and CFs in the Db2 pureScale cluster, fencedID is the user name under which the fenced user-defined functions (UDFs) and stored procedures run, and InstName is the login name of the instance owner.

    If you did not install all Db2 database add-on products that were installed in the Db2 copy from which you are upgrading, the instance upgrade fails and returns a warning message. If you plan to install these products later on or you no longer need the functionality that is provided by these products, use the -F parameter to upgrade the instance.
    Note: Due to Known Issue DT397873 the Db2 global registry is not updated after the upgrade. This issue only affects version 12.1.0.0. You need to manually upgrade it using the following steps:
    1. Retrieve the Pacemaker domain name:
      $DB2DIR/bin/db2cm -cm -list -domain
    2. As root, add the variable PCMK_CLUSTER to the global registry on each host:
      $NEW_INSTALL_DIR/bin/db2greg -addvarrec 
      service=PCMK_CLUSTER,variable=NAME,value=<domain_name>,installpath=-,
      comment=DB2_CREATED
      EXAMPLE:/opt/ibm/db2/V12.1/bin/db2greg -addvarrec 
      service=PCMK_CLUSTER,variable=NAME,value=db2domain,installpath=-,comment=DB2_CREATED
    3. Verify that the variable PCMK_CLUSTER is added to the global registry on each host:
      db2greg -dump
    4. As root, remove the dirty PEER_DOMAIN variable from the global registry on each host:
      NEW_INSTALL_DIR/bin/db2greg -delvarrec service=PEER_DOMAIN
    5. Verify that the variable PEER_DOMAIN is deleted from the global registry on each host:
      db2greg -dump
  4. Update the number of Db2 Fast Communications Manager ports that are reserved for an instance during its creation in the /etc/services file. If you plan to extend your cluster after upgrade and to have some hosts with multiple members, increase the number of ports from the default value of four to six on all the hosts in the cluster. With this change, you can extend your cluster to a maximum of three members per host where three ports are reserved for each of the logical members and three ports are reserved for the idle processes that are used for restart light.
    Note: The ports must be contiguous and same across all the members and CFs in the cluster. When a range of six contiguous ports is not available, the port range can be changed provided they remain the same in all the hosts and they are contiguous.
    For example, the port range for an instance db2inst1 in the /etc/services file before upgrade is as follows:
        DB2_db2inst1         60000/tcp
        DB2_db2inst1_1       60001/tcp
        DB2_db2inst1_2       60002/tcp
        DB2_db2inst1_END     60003/tcp
    After upgrade and before you start the instance, update the port range in the /etc/services file as follows:
        DB2_db2inst1         60000/tcp
        DB2_db2inst1_1       60001/tcp
        DB2_db2inst1_2       60002/tcp
        DB2_db2inst1_3       60003/tcp
        DB2_db2inst1_4       60004/tcp
        DB2_db2inst1_END     60005/tcp
  5. Manually convert the tiebreak redundancy group ID from 3 to 4 in cluster with the IBM® Storage Scale replication setup. Refer to Post-upgrade task for cluster using IBM Storage Scale replication.
  6. Log on to the Db2 database server as an instance user to start your instance.
  7. Verify that your instances are running on to Db2 version 12.1 by running the db2level command:
    The Informational tokens must include a string like "Db2 version 12.1.X.X" where X is a digit number.

What to do next

After upgrading your Db2 pureScale instance, you must upgrade your database. For more details, see Upgrading databases.