DB2 10.5 for Linux, UNIX, and Windows

Putting a cluster into maintenance mode

You can put a cluster into maintenance mode when you are making updates to the operating system or hardware on the hosts in the cluster.

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

About this task

If you are using high availability disaster recovery (HADR), you can use the rolling update procedure to avoid taking an outage. By failing over the primary cluster to the standby site, you can maintain database availability. For more information, see Performing rolling updates in a DB2 high availability disaster recovery (HADR) environment.

Procedure

  1. As an instance user, perform the following steps:
    1. Stop the database manager on all hosts by issuing the following command on a single host:
      su -iname
      db2stop
      exit
      where iname represents the instance owner name.
    2. On each host, stop the DB2 instance by issuing the following command:
      db2stop instance on hostname
      where hostname represents the host name for a given member or CF, and the db2stop instance on hostname command is run for each host in the cluster.
  2. As the DB2 cluster services administrator, perform the following steps:
    1. Put the cluster manager into maintenance mode on all hosts by issuing the following command:
      DB2DIR/bin/db2cluster -cm -enter -maintenance -all
      where DB2DIR represents the installation location of your DB2 copy.
    2. Put the cluster file system service on the hosts into maintenance mode by issuing the following command:
      DB2DIR/bin/db2cluster -cfs -enter -maintenance -all
      where DB2DIR represents the installation location of your DB2 copy.
    3. Perform maintenance and reboot as necessary.
      Note: If the host reboots while in maintenance, the file systems won't be mounted and the GPFS update won't be applied. To apply the update, you need to enter and exit maintenance again for the cluster file system.

What to do next

  1. As the DB2 cluster services administrator, perform the following steps:
    1. Perform any maintenance activities planned. For example, install a fix pack update, or make network topology changes to your DB2 pureScale® environment.
    2. Exit cluster manager maintenance mode on the host by issuing the following command:
      DB2DIR/bin/db2cluster -cm -exit -maintenance -all
      where DB2DIR represents the installation location of your DB2 copy.
    3. Ensure that all members and domain are active by issuing the following command:
      DB2DIR/bin/db2cluster -cm -list -host -state
      where DB2DIR represents the installation location of your DB2 copy.
    4. Exit cluster file system maintenance mode on the hosts by issuing the following command:
      DB2DIR/bin/db2cluster -cfs -exit -maintenance -all
      where DB2DIR represents the installation location of your DB2 copy. In case of timeout, check the status of the cluster file system by issuing the DB2DIR/bin/db2cluster -cfs -list -host -state command.
  2. As an instance user, perform the following steps:
    1. On each host, start the DB2 instance by issuing the following command:
      db2start instance on hostname
      where hostname represents the host name for a given member or CF, and the db2start instance on hostname command is run for each host in the cluster.
    2. Start the database manager by issuing the following command:
      su -iname
      db2start
      exit
      where iname represents the instance owner name.