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
- As an instance user, perform the following steps:
- 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.
- 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.
- As the DB2 cluster
services administrator,
perform the following steps:
- 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.
- 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.
- 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
- As the DB2 cluster
services administrator,
perform the following steps:
- Perform any maintenance activities planned. For example, install
a fix pack update, or make network topology changes to your DB2 pureScale® environment.
- 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.
- 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.
- 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.
- As an instance user, perform the following steps:
- 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.
- Start the database manager by issuing the following command:
su -iname
db2start
exit
where iname represents the instance
owner name.