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
- Ensure that you have root access.
- Ensure that you meet the installation requirements for your operating system:
- Review upgrade recommendations and disk space requirements. Refer to Best practices for upgrading Db2 servers and Disk space requirements for Db2 server upgrades.
- Perform pre-upgrade tasks such as verifying that your databases are ready for upgrade and backing up database before upgrade. For more information, see Pre-upgrade tasks for Db2 servers.
- Review the complete list of upgrade restrictions at Upgrade restrictions for Db2 servers.
Procedure
To upgrade to Db2 version 11.1 pureScale server:
- Log on to the Db2 server as the instance owner.
- 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:
To disconnect all applications and users, use the FORCE APPLICATION command:db2 list applications SQL1611W No data was returned by the Database System Monitor. SQLSTATE=00000
db2 force application all
- Stop all command line processor sessions by entering the following command
in each session that was running the command line processor:
db2 terminate
- 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). - 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:
Ensure that the db2stop force command completes successfully.db2stop force
- 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.
- Install Db2
version 11.1 by performing the following steps:
- Log on to the Db2 server with root user authority.
-
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.
where OLD_DB2_INSTALL_DIR is the pre-Db2 version 11.1 installation path.OLD_DB2_INSTALL_DIR/bin/db2cluster -cm -enter -maintenance -all
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. -
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.
-
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.
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.db2setup -l /tmp/db2setup.log -t /tmp/db2setup.trc
-
Ensure that the IBM Spectrum Scalecluster is at
the minimum release level by using the following steps:
- Use the mmlsconfig command to determine the minimum release level and whether
the
usePersistentReserve
attribute is set toYES
, as in the following example:
If theroot@XXX:/> /usr/lpp/mmfs/bin/mmlsconfig minReleaseLevel,usePersistentReserve minReleaseLevel 3.4.0.7 usePersistentReserve yes
minReleaseLevel
value is 3.5 or higher, or ifusePersistentReserve
is set toNO
, then go to step f. - 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.
- Verify that the release level is updated, by issuing the mmlsconfig command
again:
/usr/lpp/mmfs/bin/mmlsconfig minReleaseLevel minReleaseLevel 3.5.0.7
- Use the mmlsconfig command to determine the minimum release level and whether
the
-
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
-
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 asUnknown
, 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. -
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
-
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.
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.NEW_DB2_INSTALL_DIR/bin/db2cluster -cfs -commit
-
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.
where NEW_DB2_INSTALL_DIR is the Db2 version 11.1 installation path.NEW_DB2_INSTALL_DIR/bin/db2cluster -cm -commit
- 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.
- Install all Db2 add-on products that were installed in the Db2 copy from which you are upgrading.
- Upgrade Db2 pureScale instances. Refer to Upgrading Db2 pureScale instances.
- Upgrade databases. Refer to Upgrading 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.