PACEMAKER(8)
π NAME π
okay so bestie, welcome to Pacemaker β she's part of the Pacemaker cluster resource manager, and honestly she's that girl. Fr fr.
β¨ SYNOPSIS β¨
crm_resource <query>|<command> [options]
π¦ DESCRIPTION π¦
crm_resource β she does tasks related to Pacemaker cluster resources. that's the whole vibe. you point her at a <query> or a <command>, toss her some [options], and she handles it. iconic behaviour only π
π OPTIONS π
πΈ Help Options πΈ
like, if you're lost (valid), she's got you:
-h,--helpβ show help options. the little "what do i even do" starter pack.--help-allβ show all help options. the full lore drop.--help-outputβ show output help.--help-queriesβ show query help.--help-commandsβ show command help.--help-locationsβ show location help.--help-advancedβ show advanced option help. for the brave.--help-additionalβ show additional options.
π Output Options π
--output-as=FORMATβ specify output format as one of:text(default),xml. pick your aesthetic bestie π--output-to=DESTβ specify file name for output (or"-"for stdout). yes, a literal hyphen means stdout, we love a shortcut.
π§ Queries π§
these are the "just looking, don't touch" options. window shopping energy ποΈ
-L,--listβ list all cluster resources with status.-l,--list-rawβ list IDs of all instantiated resources (individual members rather than groups etc.).-O,--list-operationsβ list active resource operations, optionally filtered by--resourceand/or--node.-o,--list-all-operationsβ list all resource operations, optionally filtered by--resourceand/or--node.--list-options=TYPEβ list all available options of the given type. Allowed values:primitive(primitive resource meta-attributes),fencing(parameters common to all fencing resources).--list-standardsβ list supported standards.--list-ocf-providersβ list all available OCF providers.--list-agents=STD:PROVβ list all agents available for the named standard and/or provider.--list-ocf-alternatives=AGENTβ list all available providers for the named OCF agent.--show-metadata=SPECβ show the metadata for the namedclass:provider:agent.-q,--query-xmlβ show XML configuration of resource (after any template expansion).-w,--query-xml-rawβ show XML configuration of resource (before any template expansion).-g,--get-parameter=PARAMβ display named parameter for resource (use instance attribute unless--element,--meta, or--utilizationis specified).-W,--locateβ show node(s) currently running resource. who's got custody of her rn π-a,--constraintsβ display the location and colocation constraints that apply to a resource, and if--recursiveis specified, to the resources directly or indirectly involved in those colocations. If the named resource is part of a group, or a clone or bundle instance, constraints for the collective resource will be shown unless--forceis given.-A,--stackβ equivalent to--constraints --recursive. lazy girl math and honestly valid.-Y,--whyβ show why resources are not running, optionally filtered by--resourceand/or--node. the "why is she like this" option π
π₯ Commands π₯
π«Ά the doing-things section π«Ά
--validate=LEVELβ validate resource configuration by calling agent'svalidate-allaction. The configuration may be specified either by giving an existing resource name with-r, or by specifying--class,--agent, and--providerarguments, along with any number of--optionarguments. An optional LEVEL argument can be given to control the level of checking performed.-C,--cleanupβ if resource has any past failures, clear its history and fail count. Optionally filtered by--resource,--node,--operationand--interval(otherwise all).--operationand--intervalapply to fail counts, but entire history is always clear, to allow current state to be rechecked. If the named resource is part of a group, or one numbered instance of a clone or bundled resource, the clean-up applies to the whole collective resource unless--forceis given.-R,--refreshβ delete resource's history (including failures) so its current state is rechecked. Optionally filtered by--resourceand--node(otherwise all). If the named resource is part of a group, or one numbered instance of a clone or bundled resource, the refresh applies to the whole collective resource unless--forceis given.-p,--set-parameter=PARAMβ set named parameter for resource (requires-v). Use instance attribute unless--element,--meta, or--utilizationis specified.-d,--delete-parameter=PARAMβ delete named parameter for resource. Use instance attribute unless--element,--metaor,--utilizationis specified.
β Locations β
this is where she gets opinionated about where things live. main character energy fr.
-M,--moveβ create a constraint to move resource. If--nodeis specified, the constraint will be to move to that node, otherwise it will be to ban the current node. Unless--forceis specified this will return an error if the resource is already running on the specified node. If--forceis specified, this will always ban the current node. Optional:--lifetime,--promoted. NOTE: this may prevent the resource from running on its previous location until the implicit constraint expires or is removed with--clear.
ok so that note is important bestie β she will NOT go back home until the constraint expires or you --clear it. no take-backsies π
-B,--banβ create a constraint to keep resource off a node. Optional:--node,--lifetime,--promoted. NOTE: this will prevent the resource from running on the affected node until the implicit constraint expires or is removed with--clear. If--nodeis not specified, it defaults to the node currently running the resource for primitives and groups, or the promoted instance of promotable clones withpromoted-max=1(all other situations result in an error as there is no sane default).
lowkey the "no sane default" part is so real of her. she refuses to guess π
-U,--clearβ remove all constraints created by the--banand/or--movecommands. Requires:--resource. Optional:--node,--promoted,--expired. If--nodeis not specified, all constraints created by--banand--movewill be removed for the named resource. If--nodeand--forceare specified, any constraint created by--movewill be cleared, even if it is not for the specified node. If--expiredis specified, only those constraints whose lifetimes have expired will be removed.-e,--expiredβ modifies the--clearargument to remove constraints with expired lifetimes.-u,--lifetime=TIMESPECβ lifespan (as ISO 8601 duration) of created constraints (with-B,-M) seehttps://en.wikipedia.org/wiki/ISO_8601#Durations)--promotedβ limit scope of command to promoted role (with-B,-M,-U). For-Band-M, previously promoted instances may remain active in the unpromoted role.--masterβ Deprecated: use--promotedinstead.
she's literally telling you the old one is deprecated. use --promoted, bestie. do it for me π«Ά
π Advanced π
for when you're built different (or just really deep in the CIB). handle with care, queen π
-D,--deleteβ (Advanced) delete a resource from the CIB. Required:-t.-F,--failβ (Advanced) tell the cluster this resource has failed.--restartβ (Advanced) tell the cluster to restart this resource and anything that depends on it. This temporarily modifies the CIB, and other CIB modifications should be avoided while this is in progress. If a node is fenced because the stop portion of the restart fails, CIB modifications such astarget-rolemay remain.--waitβ (Advanced) wait until the cluster settles into a stable state.--digestsβ (Advanced) show parameter hashes that Pacemaker uses to detect configuration changes (only accurate if there is resource history on the specified node). Required:--resource,--node. Optional: anyNAME=VALUEparameters will be used to override the configuration (to see what the hash would be with those changes).--force-demoteβ (Advanced) bypass the cluster and demote a resource on the local node. Unless--forceis specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node.--force-stopβ (Advanced) bypass the cluster and stop a resource on the local node.--force-startβ (Advanced) bypass the cluster and start a resource on the local node. Unless--forceis specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node.--force-promoteβ (Advanced) bypass the cluster and promote a resource on the local node. Unless--forceis specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node.--force-check=LEVELβ (Advanced) bypass the cluster and check the state of a resource on the local node. An optional LEVEL argument can be given to control the level of checking performed.
β οΈ the whole --force-* family is literally "bypass the cluster" β that's not a cute lil tweak, that's going around her back. know that before you type it π
π Additional Options π
the supporting cast. every icon needs a entourage β¨
-N,--node=NAMEβ node name.--recursiveβ follow colocation chains when using--set-parameteror--constraints.-t,--resource-type=ELEMENTβ resource XML element (primitive,group, etc.) (with-D).-v,--parameter-value=PARAMβ value to use with-p.-m,--metaβ use resource meta-attribute instead of instance attribute (with-p,-g,-d).-z,--utilizationβ use resource utilization attribute instead of instance attribute (with-p,-g,-d).--elementβ use resource element attribute instead of instance attribute (with-p,-g,-d).-n,--operation=OPERATIONβ operation to clear instead of all (with-C -r).-I,--interval=Nβ interval of operation to clear (default0s) (with-C -r -n).--class=CLASSβ the standard the resource agent conforms to (for example,ocf). Use with--agent,--provider,--option, and--validate.--agent=AGENTβ the agent to use (for example,IPaddr). Use with--class,--provider,--option, and--validate.--provider=PROVIDERβ the vendor that supplies the resource agent (for example,heartbeat). Use with--class,--agent,--option, and--validate.--option=PARAMβ specify a device configuration parameter asNAME=VALUE(may be specified multiple times). Use with--validateand without the-roption.-s,--set-name=IDβ (Advanced) XML ID of attributes element to use (with-p,-d).-i,--nvpair=IDβ (Advanced) XML ID of nvpair element to use (with-p,-d).
ok bestie that's part one β more coming, don't go anywhere π
-T,--timeout=Nβ (advanced, bestie, don't worry about it unless you're deep in it) bail out if the command doesn't finish in this much time. Only works with--restart,--wait, and--force-*. Heads up tho: the--restartcommand uses two-second granularity and the--waitcommand uses one-second granularity, both with rounding. So likeβ¦ don't expect millisecond precision π--allβ list all the options, including the advanced ones and the deprecated ones (only does anything with--list-options). It's giving "show me everything, I can handle it" β¨-f,--forceβ force the action to actually happen. Peep the help for individual commands to see the extra behavior each one has, okay? π«Ά
π Application Options π
-$,--versionβ display the software version and dip out π-V,--verboseβ crank up the debug output. Yes you can specify this multiple times. Stack it, girl, go off π-Q,--quietβ be less descriptive in the output. Shy vibes only π-r,--resource=IDβ the resource ID, iconic as always π
π EXAMPLES π
Okay this is the part where it all clicks, fr fr. Live footage of me showing you how it's done π¬
List the available OCF agents:
# crm_resource --list-agents ocf
List the available OCF agents from the linux-ha project:
# crm_resource --list-agents ocf:heartbeat
Move myResource to a specific node:
# crm_resource --resource myResource --move --node altNode
Allow (but not force) myResource to move back to its original location:
# crm_resource --resource myResource --clear
Stop myResource (and anything that depends on it):
# crm_resource --resource myResource --set-parameter target-role--meta --parameter-value Stopped
Tell the cluster not to manage myResource β and be so serious about this one, the cluster will not attempt to start or stop the resource under any circumstances. So useful when you're doing maintenance tasks on a resource π οΈ
# crm_resource --resource myResource --set-parameter is-managed--meta --parameter-value false
Erase the operation history of myResource on aNode. The cluster will "forget" the existing resource state β including any errors β and attempt to recover the resource. Lowkey a lifesaver when a resource had failed permanently and has been repaired by an administrator π©Ή
# crm_resource --resource myResource --cleanup --node aNode
π AUTHOR π
Written by Andrew Beekhof and the Pacemaker project contributors. Legends, honestly. We stan π«Ά
And that's the whole page, bestie!! You made it to the end, I'm so proud of you ππ
Okay so the fine print: this is Pacemaker 3.0.3+20260728.7052..., dated September 2026, and it lives at PACEMAKER(8). Now go forth, run crm_resource responsibly, and text me if it explodes πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: pacemaker-cli 3.0.3+20260728.7052efa194-160000.1.1 Β· GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pacemaker-cli 3.0.3+20260728.7052efa194-160000.1.1 Β· GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pacemaker-cli 3.0.3+20260728.7052efa194-160000.1.1 Β· GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pacemaker-cli 3.0.3+20260728.7052efa194-160000.1.1 Β· GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms