Upgrading a Db2 pureScale server

Upgrading a Db2 pureScale server to Db2 version 11.1 on Linux® and UNIX requires that you install a new version 11.1 copy and then manually upgrade your existing instances and databases to this new copy.

Before you begin

Procedure

To upgrade to Db2 version 11.1 pureScale server:

  1. Log on to the Db2 server as the instance owner.
  2. Disconnect all applications and users on every member node. To get a list of all database connections for the current instance, issue the LIST APPLICATIONS command. If all applications are disconnected, this command returns the following message:
       db2 list applications
         SQL1611W No data was returned by the Database System Monitor.
         SQLSTATE=00000
    To disconnect all applications and users, use the FORCE APPLICATION command:
       db2 force application all
  3. Stop all command line processor sessions by entering the following command in each session that was running the command line processor:
       db2 terminate
  4. When all applications and users are disconnected and all command line processor sessions are stopped, stop the database manager instance:
       db2stop
    Note: The time that is needed for the db2stop command to complete the action depends on the number of cluster caching facilities (CFs) and members in the cluster (up to 10 minutes).
  5. If the db2stop command is not successful and fails to stop the database manager instance timeout due to new incoming connections, run the following command to disconnect all user connections and stop the database manager instance:
       db2stop force
    Ensure that the db2stop force command completes successfully.
  6. Stop all instance processes in members and cluster caching facilities (CFs) in any order by issuing the db2stop instance on <hostname> command on any node, where hostname is the name of each member or CF in the cluster.
  7. Install Db2 version 11.1 by performing the following steps:
    1. Log on to the Db2 server with root user authority.
    2. Put the cluster management software into maintenance mode on all members and cluster caching facilities (CFs) by issuing the following command from the pre-Db2 version 11.1 installation path . This command stops the peer domain services on all hosts and prevents it from restarting during system maintenance.
      You can issue the following command only one time on any one of the members or CFs in the cluster.
      OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -enter -maintenance -all
      where OLD_DB2_INSTALL_DIR is the pre-Db2 version 11.1 installation path.
      For example, if you are upgrading from Db2 version 10.5 to Db2 version 11.1, the default OLD_DB2_INSTALL_DIR is specified as /opt/IBM/db2/V10.5.
    3. Put the cluster file system into maintenance mode on all members and CFs by issuing the following command from the pre-Db2 version 11.1 installation path. This command stops all hosts from accessing the cluster files system (IBM® Spectrum Scale) during system maintenance.
      You can issue the following command only one time on any one of the members or CFs in the cluster.
      OLD_DB2_INSTALL_DIR/bin/db2cluster -cfs -enter -maintenance -all

      If the above command returns a warning indicating the IBM Spectrum Scale module cannot be unloaded, a reboot will be required before proceeding to next step.

    4. Install Db2 version 11.1 using the Db2 Setup wizard. Run the db2setup command and select the New Install option on the Welcome panel. Choose Db2 Version 11.1.0.0 Advanced Editions with Db2 pureScale and click Next to install a new copy of Db2 version 11.1.
      db2setup -l /tmp/db2setup.log -t /tmp/db2setup.trc
      In the Configuration panel, uncheck Create an instance. The Db2 installer still performs the installation, but, you can create an instance at a later point by running the db2icrt or db2isetup command. The Db2 Setup wizard provides a clear flow through which you can start a Db2 pureScale Feature installation from one member and successfully setup a Db2 pureScale environment across multiple members. The cluster management software and the cluster file system software are also upgraded during the installation to meet the 11.1 requirements. For more information, see Install Db2 version 11.1.
    5. Ensure that the IBM Spectrum Scalecluster is at the minimum release level by using the following steps:
      1. Use the mmlsconfig command to determine the minimum release level and whether the usePersistentReserve attribute is set to YES, as in the following example:
        root@XXX:/> /usr/lpp/mmfs/bin/mmlsconfig minReleaseLevel,usePersistentReserve
        minReleaseLevel 3.4.0.7
        usePersistentReserve yes
        If the minReleaseLevel value is 3.5 or higher, or if usePersistentReserve is set to NO, then go to step f.
      2. Use the mmchconfig command to update the IBM Spectrum Scale configuration information to the most current format that is supported by your IBM Spectrum Scale level, as in the following example:
        /usr/lpp/mmfs/bin/mmchconfig release=LATEST
        Verifying that all nodes in the cluster are up-to-date ...
        Verifying GPFS is stopped on all nodes ...
        mmchconfig: Command successfully completed
        mmchconfig: Propagating the cluster configuration data to all
         affected nodes.  This is an asynchronous process.
      3. Verify that the release level is updated, by issuing the mmlsconfig command again:
        /usr/lpp/mmfs/bin/mmlsconfig minReleaseLevel
        minReleaseLevel 3.5.0.7
    6. As a root user, take the cluster management software out of maintenance mode by issuing the following command from the pre-Db2 version 11.1 installation path. You can issue the following command only one time on any one of the members or CFs in the cluster.
      OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -exit -maintenance -all
      Note: If the old Db2 installation path is of Db2 version 10.1, you must take the cluster management software out of maintenance mode by issuing the following command:
      OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -exit -maintenance 
    7. Ensure that all of the db2mnt resource groups are online, by issuing the lssam command as provided in the following example:
      lssam -s "Name like '%db2mnt%rg'"
      Online IBM.ResourceGroup:db2mnt-db2sd-rg Nominal=Online
              '- Online IBM.Application:db2mnt-db2sd-rs
                      |- Online IBM.Application:db2mnt-db2sd-rs:XXX
                      '- Online IBM.Application:db2mnt-db2sd-rs:YYY
      If any groups are reported as Unknown, like in the following example, then reenter and exit maintenance mode, as described in 7.b and 7.f:
      lssam -s "Name like '%db2mnt%rg'"
      Unknown IBM.ResourceGroup:db2mnt-db2sd-rg Control=MemberInProblemState Nominal=Online
              '- Online IBM.Application:db2mnt-db2sd-rs  Control=MemberInProblemState
                      |- Online IBM.Application:db2mnt-db2sd-rs:XXX
                      '- Online IBM.Application:db2mnt-db2sd-rs:YYY
      Note: In this scenario, you need to repeat steps b and f only; you do not need to repeat steps c, d, and e.
    8. As a root user, take the cluster file system software out of maintenance mode by issuing the following command from the pre-Db2 version 11.1 installation path.
      OLD_DB2_INSTALL_DIR/bin/db2cluster -cfs -exit -maintenance -all
    9. As a root user, commit changes to the cluster file system by issuing the following command from the Db2 version 11.1 installation path. You can issue the following command only one time on any one of the members or CFs in the cluster.
      NEW_DB2_INSTALL_DIR/bin/db2cluster -cfs -commit
      where NEW_DB2_INSTALL_DIR is the Db2 version 11.1 installation path. For example, if you are upgrading from Db2 version 10.5 to Db2 version 11.1, the NEW_DB2_INSTALL_DIR is specified as /opt/IBM/db2/V11.1.
    10. As a root user, commit changes to the cluster management software by issuing the following command from the Db2 version 11.1 installation path. You can issue the following command only one time on any one of the members or CFs in the cluster.
      NEW_DB2_INSTALL_DIR/bin/db2cluster -cm -commit
      where NEW_DB2_INSTALL_DIR is the Db2 version 11.1 installation path.
    11. As an instance owner, restart the Db2 instance processes on all members and CFs in any order with updated resources for the cluster management software and the cluster file system software by issuing the db2start instance on <hostname> command on any node, where the hostname is the name of each member or CF in the cluster.
  8. Install all Db2 add-on products that were installed in the Db2 copy from which you are upgrading.
  9. Upgrade Db2 pureScale instances. Refer to Upgrading Db2 pureScale instances.
  10. Upgrade databases.

What to do next

After you upgrade the Db2 server, perform the recommended Post-upgrade tasks for Db2 servers such as resetting the diagnostic error level, adjusting log space size, and rebinding packages. In addition, verify that the upgrade of your Db2 server was successful.