Clone resource options control how many instances of a service can run at once and how those instances are scheduled across the cluster. Correct limits prevent accidental overcommitment while still allowing active-active designs and scale-out workloads to use all available nodes.
In Pacemaker, a clone is a wrapper around an existing resource that tells the scheduler to run multiple instances of that resource. Clone behavior is tuned with meta attributes on the clone definition, including clone-max (cluster-wide instance limit), clone-node-max (per-node instance limit), plus scheduling modifiers such as ordered and interleave that affect start/stop sequencing and dependency handling.
Changing clone meta attributes can trigger rescheduling and restarts as the cluster converges on the new policy. Keep clone-max aligned with the number of eligible nodes intended to run the service, and treat clone-node-max greater than 1 as a deliberate choice that may require per-instance ports, storage isolation, or other safeguards.
Steps to set Pacemaker clone resource options:
- Show the current clone definition with its meta attributes.
$ sudo pcs resource config dummy-check-clone Clone: dummy-check-clone Meta Attributes: dummy-check-clone-meta_attributes clone-max=2 Resource: dummy-check (class=ocf provider=pacemaker type=Dummy) ##### snipped #####Clone options live on the clone wrapper (dummy-check-clone), not the underlying resource (dummy-check).
- Update cluster-wide clone-max plus per-node clone-node-max on the clone resource.
$ sudo pcs resource update dummy-check-clone meta clone-max=3 clone-node-max=1
Set clone-max to the maximum number of nodes intended to run the service at the same time.
Setting clone-max higher than available capacity can start too many instances and overload nodes or exhaust shared dependencies.
- Set clone scheduling modifiers when ordering or dependency behavior needs adjustment.
$ sudo pcs resource update dummy-check-clone meta interleave=true ordered=false
ordered forces sequential start/stop across clone instances, while interleave allows ordered dependent clones to start in parallel per instance.
- Confirm the clone meta attributes were updated in the cluster configuration.
$ sudo pcs resource config dummy-check-clone Clone: dummy-check-clone Meta Attributes: dummy-check-clone-meta_attributes clone-max=3 clone-node-max=1 interleave=true ordered=false Resource: dummy-check (class=ocf provider=pacemaker type=Dummy) ##### snipped ##### - Verify the running clone instance count matches the configured limits.
$ sudo pcs status --full ##### snipped ##### Full List of Resources: * Clone Set: dummy-check-clone [dummy-check]: * dummy-check (ocf:pacemaker:Dummy): Started node-03 * dummy-check (ocf:pacemaker:Dummy): Started node-01 * dummy-check (ocf:pacemaker:Dummy): Started node-02 ##### snipped #####
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.
