When you put pureScale hosts into maintenance mode, don't be surprised with the following message.
You may see this if you are on DB2 V11.1 Mod Pack 3 Fixpack 3.
# /opt/IBM/DB2/V11.1.3/bin/db2cluster -cm -enter -maintenance
"The DB2INSTANCE environment variable has not been set. Set the DB2INSTANCE environment variable to the instance name and re-issue the command.
A diagnostic log has been saved to '/tmp/ibm.db2.cluster.xxxxx'.
Starting from V184.108.40.206, when a specific host wants to enter -cm maintenance mode with "db2cluster -cm -enter -maintenance" command,
the DB2INSTANCE variable needs to be set prior to running it.
This is added as part of the feature to allow multiple hosts to be in maintenance at the same time.
Same DB2INSTANCE requirement applies for "-cm -exit -maintenance" as well.
The behavior of putting all hosts at once "-cm -enter/-exit -maintenance -all" is not changed and doesn't require DB2INSTANCE to be set.
The following DB2 manual page also has the change log.
• Db2 pureScale host maintenance enhancement offers support for multiple hosts to enter and exit maintenance mode while maintaining the quorum.
This enhancement allows hosts to be down for an extended period of time while performing other maintenance tasks.
Specify the instance name by setting the DB2INSTANCE environment variable before executing the db2cluster -cm -enter/-exit -maintenance commands.
Following command output is an example for doing that where Db2 instance is 'db2inst1' and installation path is '/opt/IBM/DB2/V11.1.3'.
( This should be run by 'root' user. )
# export DB2INSTANCE=db2inst1
# /opt/IBM/DB2/V11.1.3/bin /db2cluster -cm -enter -maintenance
Host 'host1' has entered maintenance mode.