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.
    For Db2 Cancun Release 10.5.0.4 and above, issue the db2iupgrade command from the member in a Db2 pureScale cluster:
       $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.

    For Db2 Version 10.5 Fix Pack 3 and below, issue the db2iupgrade command from the version 12.1 installation path of all the members first and then from the CFs:
       $DB2DIR/instance/db2iupgrade -d [ -u fencedID ] InstName
    Where DB2DIR is set to the location that you specified during Db2 version 12.1 installation, 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.

  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.