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 --resource and/or --node.
  • -o, --list-all-operations β€” list all resource operations, optionally filtered by --resource and/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 named class: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 --utilization is 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 --recursive is 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 --force is given.
  • -A, --stack β€” equivalent to --constraints --recursive. lazy girl math and honestly valid.
  • -Y, --why β€” show why resources are not running, optionally filtered by --resource and/or --node. the "why is she like this" option 😭

πŸ”₯ Commands πŸ”₯

🫢 the doing-things section 🫢

  • --validate=LEVEL β€” validate resource configuration by calling agent's validate-all action. The configuration may be specified either by giving an existing resource name with -r, or by specifying --class, --agent, and --provider arguments, along with any number of --option arguments. 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, --operation and --interval (otherwise all). --operation and --interval apply 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 --force is given.
  • -R, --refresh β€” delete resource's history (including failures) so its current state is rechecked. Optionally filtered by --resource and --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 --force is given.
  • -p, --set-parameter=PARAM β€” set named parameter for resource (requires -v). Use instance attribute unless --element, --meta, or --utilization is specified.
  • -d, --delete-parameter=PARAM β€” delete named parameter for resource. Use instance attribute unless --element, --meta or, --utilization is 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 --node is specified, the constraint will be to move to that node, otherwise it will be to ban the current node. Unless --force is specified this will return an error if the resource is already running on the specified node. If --force is 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 --node is not specified, it defaults to the node currently running the resource for primitives and groups, or the promoted instance of promotable clones with promoted-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 --ban and/or --move commands. Requires: --resource. Optional: --node, --promoted, --expired. If --node is not specified, all constraints created by --ban and --move will be removed for the named resource. If --node and --force are specified, any constraint created by --move will be cleared, even if it is not for the specified node. If --expired is specified, only those constraints whose lifetimes have expired will be removed.
  • -e, --expired β€” modifies the --clear argument to remove constraints with expired lifetimes.
  • -u, --lifetime=TIMESPEC β€” lifespan (as ISO 8601 duration) of created constraints (with -B, -M) see https://en.wikipedia.org/wiki/ISO_8601#Durations)
  • --promoted β€” limit scope of command to promoted role (with -B, -M, -U). For -B and -M, previously promoted instances may remain active in the unpromoted role.
  • --master β€” Deprecated: use --promoted instead.
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 as target-role may 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: any NAME=VALUE parameters 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 --force is 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 --force is 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 --force is 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-parameter or --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 (default 0s) (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 as NAME=VALUE (may be specified multiple times). Use with --validate and without the -r option.
  • -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 --restart command uses two-second granularity and the --wait command 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