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
Important: To run the db2cm utility as the root user, ensure that the DB2INSTANCE
environment variable is set to the instance owner.
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
Pacemaker, Corosync, or GPFS (or TSA and RSCT if on an AIX system) on the host
should be terminated on this host, before running this
task.
Multiple hosts can be put into maintenance mode one at a time using the
db2cm command (
db2cluster command for AIX systems).
Important:
- For Db2 pureScale clusters on AIX using TSA and RSCT, quorum can be maintained until only one
host remains online and not in maintenance mode.
- For Db2 pureScale clusters using Pacemaker and Corosync, quorum can only be maintained if more
than half the hosts are online and not in maintenance mode.
Attempting to enter maintenance mode on more than half the hosts in a Pacemaker/Corosync-based
cluster will result in a quorum loss error.
Note: You cannot
use this procedure to put an 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 System Administrator (or the
Db2 cluster
services
administrator on AIX systems).
About this task
This task describes how to enter
a pureScale host into maintenance mode and subsequently exit maintenance
mode.
Procedure
- 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:
- 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.
-
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.
- As the System Administrator (or the Db2 cluster
services
administrator on AIX systems), perform the following steps:
- Put the cluster manager into maintenance mode on the host, by issuing the following
command:
DB2INSTANCE=<instanceName> DB2DIR/bin/db2cm -cm -enter -maintenance
On
AIX:
DB2INSTANCE=<instanceName> DB2DIR/bin/db2cluster -cm -enter -maintenance
where
DB2DIR represents the installation location of your
Db2
copy.
- Put the cluster file system service on the host into maintenance mode, by issuing the
following command:
DB2DIR/bin/db2cm -cfs -enter -maintenance
On
AIX:
DB2DIR/bin/db2cluster -cfs -enter -maintenance
where
DB2DIR represents the installation location of your
Db2
copy.
- 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.
- Exit cluster manager maintenance mode on the host by issuing the following
command:
DB2INSTANCE=<instanceName> DB2DIR/bin/db2cm -cm -exit -maintenance
On
AIX:
DB2INSTANCE=<instanceName> DB2DIR/bin/db2cluster -cm -exit -maintenance
where
DB2DIR represents the installation location of your
Db2
copy.
- Exit cluster file system maintenance mode on the host by issuing the following
command:
DB2DIR/bin/db2cm -cfs -exit -maintenance
On
AIX:
DB2DIR/bin/db2cluster -cfs -exit -maintenance
where
DB2DIR represents the installation location of your
Db2
copy.
- As an instance user, perform the following steps:
- 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.
- 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.