Performing maintenance on a Db2 pureScale host

You can perform maintenance on or apply updates to a member host without affecting the availability of the databases in the Db2 pureScale instance.

Before you begin

All Db2 instances on the host must be stopped as part of this task. When the instance is stopped on the host, the host is no longer a viable recovery target for failed members. Any other applications using TSA, GPFS, or RSCT on the host should be terminated on this host, prior to executing this task.

Multiple hosts can be put into maintenance mode one at a time using the db2cluster command. Quorum can be maintained until only one host remains online and not in maintenance mode in the cluster.
Note: This procedure cannot be used to put the entire cluster into maintenance mode. Exit maintenance on all hosts and use the -all option to put the whole cluster into maintenance mode. For more information, refer to Putting a cluster into maintenance mode.
Attention: If all but one host is in maintenance mode, do NOT reboot the last host as the cluster will be unable to recover it automatically.

To perform this task, you must be the Db2 cluster services administrator.

About this task

This task describes how to enter a pureScale host into maintenance mode and subsequently exit maintenance mode.

Procedure

  1. All instances must be stopped on the host (in the db2stop step) before the host can enter maintenance mode. As an instance user, perform the following steps:
    1. Perform a member drain operation using the QUIESCE parameter of the db2stop command, as follows:
      db2stop member <member-id> quiesce 30
      where <member-id> represents the member that you want to put into maintenance mode.

      For more information on quiescing a member, see Quiescing a member.

      For CF, perform the following command instead:
      db2stop CF <cf-id>
      where <cf-id> represents the CF that you want to put into maintenance mode.
      Attention: If the primary CF is being stopped, then there must be a secondary CF with a state of PEER.
    2. Before you stop the host, make sure that there are only the members or CF targeted for maintenance on the host. Stop the instance on the member or CF hosts, as follows:
      db2stop instance on host-name
      where host-name represents the name of the host of the given member or CF.
  2. As the Db2 cluster services administrator, perform the following steps:
    1. Put the cluster manager into maintenance mode on the host, by issuing the following command:
      DB2INSTANCE=<instanceName> DB2DIR/bin/db2cluster -cm -enter -maintenance
      where DB2DIR represents the installation location of your Db2 copy.
    2. Put the cluster file system service on the host into maintenance mode, by issuing the following command:
      DB2DIR/bin/db2cluster -cfs -enter -maintenance
      where DB2DIR represents the installation location of your Db2 copy.
    3. Perform maintenance and reboot as necessary. For example, make hardware configuration changes.
      Note: After you perform a reboot, you might notice that the GPFS daemon is restarted even though the cluster file system is still in maintenance mode; however, the file system service is not functional until after you exit maintenance mode.
    4. Exit cluster manager maintenance mode on the host by issuing the following command:
      DB2INSTANCE=<instanceName> DB2DIR/bin/db2cluster -cm -exit -maintenance
      where DB2DIR represents the installation location of your Db2 copy.
    5. Exit cluster file system maintenance mode on the host by issuing the following command:
      DB2DIR/bin/db2cluster -cfs -exit -maintenance
      where DB2DIR represents the installation location of your Db2 copy.
  3. As an instance user, perform the following steps:
    1. Restart the instance on the host by issuing the following command:
      db2start instance on host-name
      where host-name represents the name of the host of the given member or CF.
    2. Restart the member by issuing the following command:
      db2start member <member-id> 
      where <member-id> represents the member that you want to put into maintenance mode.
      For CF, perform the following command instead:
      db2start CF <cf-id>
      where <cf-id> represents the CF that you want to put into maintenance mode.