What is the difference between standby and maintenance mode in pacemaker cluster
Environment
- Red Hat Enterprise Linux (RHEL) 6, 7, 8 or 9 with the High Availability Add On
pacemaker
Issue
-
What is the difference between standby and maintenance mode in pacemaker cluster
# pcs property set maintenance-mode=true AND # pcs cluster standby <node_name> # For RHEL8 and later use the following instead: # pcs node standby <node>
Resolution
Prohibiting a cluster node from hosting resources:
There are times when an administrator needs to temporarily suspend resource hosting of a cluster node without disrupting regular cluster operation. This can happen, for example, when a critical security update needs to be applied for the hosted resource. The update can be applied after putting node by node into standby mode, resulting in a reduced downtime. A different use case is to test resource migration. When a node is put in standby mode, it does not host any resources in it. Resources that are currently running on the node will be migrated to another node.
The pcs cluster standby command can put the local node in standby mode. The pcs cluster standby command can put a remote node that is provided as a parameter or all nodes with the --all option in standby mode.
To put the remote cluster member, into standby mode, run:
# pcs cluster standby <node_name>
# For RHEL8 and later use the following instead:
# pcs node standby <node>
The following command removes the specified node from standby mode. After running this command, the specified node is then able to host resources.
# pcs cluster unstandby <node_name>
# For RHEL8 and later use the following instead:
# pcs node unstandby <node>
High Availability Add-On Reference (RHEL 7) | 4.4.5. Standby Mode
Maintenance Mode tells the cluster to go to a hands off mode, and not start or stop any services until told otherwise. When maintenance mode is completed, the cluster does a sanity check of the current state of any services, and then stops or starts any that need it.
Example:
# pcs property set maintenance-mode=true
To move back, change the value to false as :
# pcs property set maintenance-mode=false
For more information:
- High Availability Add-On Reference (RHEL 7)| Chapter 12. Pacemaker Cluster Properties
- When to use
maintenance-modein RHEL High Availability Add-on for pacemaker based cluster?
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.