Putting a Pacemaker cluster into maintenance-mode pauses automated resource management during planned maintenance, preventing unexpected restarts, migrations, and recovery actions while infrastructure changes are in progress.
The maintenance-mode cluster property disables monitoring and start/stop decisions for all resources, leaving their current state unchanged until the property is cleared. Cluster-wide maintenance mode overrides node- and resource-level maintenance settings.
The setting applies to the entire cluster and persists until explicitly disabled, so automatic failover and recovery are effectively suspended for the duration. Clearing maintenance-mode can immediately trigger reconciliation actions (start/stop/recover) so services match the configured desired state.
Steps to set maintenance mode in Pacemaker:
- Enable cluster-wide maintenance mode.
$ sudo pcs property set maintenance-mode=true
The change is stored in the cluster configuration and only needs to be run once from any node with pcs access.
- Verify the maintenance-mode property is enabled.
$ sudo pcs property show --all | grep -E 'maintenance-mode[=:]' maintenance-mode=true
Older pcs output may appear as maintenance-mode=true.
- Confirm Pacemaker reports resource management as disabled.
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-03 (version 2.1.6-6fdc9deea29) - partition with quorum * Last updated: Wed Dec 31 09:47:55 2025 on node-01 * Last change: Wed Dec 31 09:47:54 2025 by root via cibadmin on node-01 * 3 nodes configured * 7 resource instances configured *** Resource management is DISABLED *** The cluster will not attempt to start, stop or recover services ##### snipped ##### Full List of Resources: * Resource Group: web-stack (maintenance): * cluster_ip (ocf:heartbeat:IPaddr2): Started node-02 (maintenance) * Clone Set: stateful-demo-clone [stateful-demo] (promotable, maintenance): * stateful-demo (ocf:pacemaker:Stateful): Promoted node-03 (maintenance) * stateful-demo (ocf:pacemaker:Stateful): Unpromoted node-01 (maintenance) * Stopped: [ node-02 ] ##### snipped ##### - Disable maintenance mode after planned work is complete.
$ sudo pcs property set maintenance-mode=false
Leaving maintenance-mode enabled disables automated recovery and failover until the property is cleared.
- Verify the maintenance-mode property is disabled.
$ sudo pcs property show --all | grep -E 'maintenance-mode[=:]' maintenance-mode=false
- Confirm Pacemaker has resumed managing resources.
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-03 (version 2.1.6-6fdc9deea29) - partition with quorum * Last updated: Wed Dec 31 09:47:56 2025 on node-01 * Last change: Wed Dec 31 09:47:55 2025 by root via cibadmin on node-01 * 3 nodes configured * 7 resource instances configured ##### snipped #####
If resources were manually stopped during maintenance, clearing maintenance-mode may start them again to match cluster configuration.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
