Removing an unused Pacemaker resource prevents the cluster from monitoring, restarting, or failing over a service that is no longer meant to be managed, keeping the configuration predictable and easier to maintain.
Resources are stored in the cluster configuration (the CIB) and enforced by Pacemaker based on resource definitions, operations, and constraints; the pcs command updates the live configuration and propagates changes across the cluster.
Disabling or deleting a resource can stop a production service and can indirectly impact other resources through ordering and colocation rules, so constraint references should be removed first and resource IDs should be verified carefully, especially when deleting a group, clone, or bundle where pcs removes contained resources as well.
Related: How to create a Pacemaker resource
Related: How to clear Pacemaker resource failures
Steps to delete a Pacemaker resource:
- List configured resources to confirm the exact resource ID targeted for deletion.
$ sudo pcs status resources * cluster_ip (ocf:heartbeat:IPaddr2): Started node-02 * web-service (systemd:nginx): Started node-02
Deleting a group, clone, or bundle ID removes all resources contained inside it.
- List constraint IDs that reference the resource.
$ sudo pcs constraint ref web-service Resource: web-service colocation-web-service-cluster_ip-INFINITY order-cluster_ip-web-service-mandatory
Constraint IDs returned here must be removed or updated to avoid dangling references after deletion.
- Delete any constraint IDs that reference the resource.
$ sudo pcs constraint delete colocation-web-service-cluster_ip-INFINITY order-cluster_ip-web-service-mandatory
Removing constraints can change where other resources run and the order they start, which can interrupt dependent services.
- Disable the resource before deletion.
$ sudo pcs resource disable web-service --safe --wait=120 Waiting for the cluster to apply configuration changes (timeout: 120 seconds)... resource 'web-service' is not running on any node
Preview the impact without changes by adding --simulate and list only affected resources by adding --brief.
Disabling stops the service and may interrupt client access.
- Delete the resource from the cluster configuration.
$ sudo pcs resource delete web-service Deleting Resource - web-service
Deleting a resource removes it from cluster management and cannot be undone without re-creating it.
- Verify the resource is no longer listed.
$ sudo pcs status resources * cluster_ip (ocf:heartbeat:IPaddr2): Started node-02
- Verify no constraints still reference the deleted resource ID.
$ sudo pcs constraint ref web-service Resource: web-service No Matches
No listed constraint IDs indicates no remaining references to web-service in the current constraint 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.
