1PACEMAKER(8)            System Administration Utilities           PACEMAKER(8)
2
3
4

NAME

6       Pacemaker - Part of the Pacemaker cluster resource manager
7

SYNOPSIS

9       crm_resource <query>|<command> [options]
10

DESCRIPTION

12       crm_resource - perform tasks related to Pacemaker cluster resources
13

OPTIONS

15   Help Options:
16       -h, --help
17              Show help options
18
19       --help-all
20              Show all help options
21
22       --help-output
23              Show output help
24
25       --help-queries
26              Show query help
27
28       --help-commands
29              Show command help
30
31       --help-locations
32              Show location help
33
34       --help-advanced
35              Show advanced option help
36
37       --help-additional
38              Show additional options
39
40   Output Options:
41       --output-as=FORMAT
42              Specify output format as one of: text (default), xml
43
44       --output-to=DEST
45              Specify file name for output (or "-" for stdout)
46
47       --text-fancy
48              Use more highly formatted output (requires --output-as=text)
49
50   Queries:
51       -L, --list
52              List all cluster resources with status
53
54       -l, --list-raw
55              List  IDs  of  all  instantiated  resources  (individual members
56              rather than groups etc.)
57
58       -O, --list-operations
59              List active resource operations, optionally  filtered  by  --re‐
60              source and/or --node
61
62       -o, --list-all-operations
63              List  all resource operations, optionally filtered by --resource
64              and/or --node
65
66       --list-standards
67              List supported standards
68
69       --list-ocf-providers
70              List all available OCF providers
71
72       --list-agents=STD:PROV
73              List all agents available for the named standard and/or provider
74
75       --list-ocf-alternatives=AGENT
76              List all available providers for the named OCF agent
77
78       --show-metadata=SPEC
79              Show the metadata for the named class:provider:agent
80
81       -q, --query-xml
82              Show XML configuration of resource (after  any  template  expan‐
83              sion)
84
85       -w, --query-xml-raw
86              Show  XML  configuration of resource (before any template expan‐
87              sion)
88
89       -g, --get-parameter=PARAM
90              Display named parameter for resource (use instance attribute un‐
91              less --meta or --utilization is specified)
92
93       -W, --locate
94              Show node(s) currently running resource
95
96       -A, --stack
97              Display  the  (co)location  constraints that apply to a resource
98              and the resources is it colocated with
99
100       -a, --constraints
101              Display the (co)location constraints that apply to a resource
102
103       -Y, --why
104              Show why resources are not running, optionally filtered by --re‐
105              source and/or --node
106
107   Commands:
108       --validate=LEVEL
109              Validate  resource configuration by calling agent's validate-all
110              action. The configuration may be specified either by  giving  an
111              existing  resource  name  with  -r,  or  by  specifying --class,
112              --agent, and --provider arguments,  along  with  any  number  of
113              --option  arguments.  An optional LEVEL argument can be given to
114              control the level of checking performed.
115
116       -C, --cleanup
117              If resource has any past failures, clear its  history  and  fail
118              count.  Optionally  filtered  by --resource, --node, --operation
119              and --interval (otherwise all). --operation and --interval apply
120              to  fail  counts,  but  entire history is always clear, to allow
121              current state to be rechecked. If the named resource is part  of
122              a  group,  or  one  numbered  instance of a clone or bundled re‐
123              source, the clean-up applies to the  whole  collective  resource
124              unless --force is given.
125
126       -R, --refresh
127              Delete  resource's  history  (including failures) so its current
128              state is rechecked. Optionally filtered by --resource and --node
129              (otherwise  all).  If  the named resource is part of a group, or
130              one numbered instance of a clone or bundled  resource,  the  re‐
131              fresh applies to the whole collective resource unless --force is
132              given.
133
134       -p, --set-parameter=PARAM
135              Set named parameter for resource (requires -v). Use instance at‐
136              tribute unless --meta or --utilization is specified.
137
138       -d, --delete-parameter=PARAM
139              Delete  named parameter for resource. Use instance attribute un‐
140              less --meta or --utilization is specified.
141
142   Locations:
143       -M, --move
144              Create a constraint to move resource. If  --node  is  specified,
145              the  constraint  will be to move to that node, otherwise it will
146              be to ban the current node. Unless  --force  is  specified  this
147              will  return  an error if the resource is already running on the
148              specified node. If --force is specified, this  will  always  ban
149              the  current node.  Optional: --lifetime, --promoted. NOTE: This
150              may prevent the resource from running on its  previous  location
151              until  the  implicit  constraint  expires  or  is  removed  with
152              --clear.
153
154       -B, --ban
155              Create a constraint to keep  resource  off  a  node.   Optional:
156              --node, --lifetime, --promoted.  NOTE: This will prevent the re‐
157              source from running on the affected node until the implicit con‐
158              straint  expires  or  is  removed with --clear. If --node is not
159              specified, it defaults to the node  currently  running  the  re‐
160              source  for  primitives  and groups, or the promoted instance of
161              promotable clones with promoted-max=1 (all other situations  re‐
162              sult in an error as there is no sane default).
163
164       -U, --clear
165              Remove  all  constraints created by the --ban and/or --move com‐
166              mands. Requires: --resource. Optional: --node, --promoted, --ex‐
167              pired.  If  --node  is not specified, all constraints created by
168              --ban and --move will be removed  for  the  named  resource.  If
169              --node  and  --force  are  specified,  any constraint created by
170              --move will be cleared, even if it  is  not  for  the  specified
171              node.  If  --expired  is specified, only those constraints whose
172              lifetimes have expired will be removed.
173
174       -e, --expired
175              Modifies the --clear argument to remove constraints with expired
176              lifetimes.
177
178       -u, --lifetime=TIMESPEC
179              Lifespan (as ISO 8601 duration) of created constraints (with -B,
180              -M) see https://en.wikipedia.org/wiki/ISO_8601#Durations)
181
182       --promoted
183              Limit scope of command to promoted role (with -B, -M,  -U).  For
184              -B  and  -M,  previously promoted instances may remain active in
185              the unpromoted role.
186
187       --master
188              Deprecated: Use --promoted instead
189
190   Advanced:
191       -D, --delete
192              (Advanced) Delete a resource from the CIB. Required: -t
193
194       -F, --fail
195              (Advanced) Tell the cluster this resource has failed
196
197       --restart
198              (Advanced) Tell the cluster to restart this  resource  and  any‐
199              thing that depends on it
200
201       --wait (Advanced) Wait until the cluster settles into a stable state
202
203       --digests
204              (Advanced)  Show  parameter hashes that Pacemaker uses to detect
205              configuration changes (only accurate if there is  resource  his‐
206              tory  on the specified node). Required: --resource, --node.  Op‐
207              tional: any NAME=VALUE parameters will be used to  override  the
208              configuration  (to  see  what  the  hash  would  be  with  those
209              changes).
210
211       --force-demote
212              (Advanced) Bypass the cluster and demote a resource on the local
213              node.  Unless --force is specified, this will refuse to do so if
214              the cluster believes the resource is a  clone  instance  already
215              running on the local node.
216
217       --force-stop
218              (Advanced)  Bypass  the cluster and stop a resource on the local
219              node
220
221       --force-start
222              (Advanced) Bypass the cluster and start a resource on the  local
223              node.  Unless --force is specified, this will refuse to do so if
224              the cluster believes the resource is a  clone  instance  already
225              running on the local node.
226
227       --force-promote
228              (Advanced)  Bypass the cluster and promote a resource on the lo‐
229              cal node. Unless --force is specified, this will refuse to do so
230              if the cluster believes the resource is a clone instance already
231              running on the local node.
232
233       --force-check=LEVEL
234              (Advanced) Bypass the cluster and check the state of a  resource
235              on  the  local  node. An optional LEVEL argument can be given to
236              control the level of checking performed.
237
238   Additional Options:
239       -N, --node=NAME
240              Node name
241
242       --recursive
243              Follow colocation chains when using --set-parameter
244
245       -t, --resource-type=ELEMENT
246              Resource XML element (primitive, group, etc.) (with -D)
247
248       -v, --parameter-value=PARAM
249              Value to use with -p
250
251       -m, --meta
252              Use resource meta-attribute instead of instance attribute  (with
253              -p, -g, -d)
254
255       -z, --utilization
256              Use resource utilization attribute instead of instance attribute
257              (with -p, -g, -d)
258
259       -n, --operation=OPERATION
260              Operation to clear instead of all (with -C -r)
261
262       -I, --interval=N
263              Interval of operation to clear (default 0) (with -C -r -n)
264
265       --class=CLASS
266              The standard the resource agent conforms to (for example,  ocf).
267              Use with --agent, --provider, --option, and --validate.
268
269       --agent=AGENT
270              The  agent  to  use  (for  example,  IPaddr).  Use with --class,
271              --provider, --option, and --validate.
272
273       --provider=PROVIDER
274              The vendor that supplies the resource agent (for example, heart‐
275              beat). Use with --class, --agent, --option, and --validate.
276
277       --option=PARAM
278              Specify  a  device configuration parameter as NAME=VALUE (may be
279              specified multiple times). Use with --validate and  without  the
280              -r option.
281
282       -s, --set-name=ID
283              (Advanced) XML ID of attributes element to use (with -p, -d)
284
285       -i, --nvpair=ID
286              (Advanced) XML ID of nvpair element to use (with -p, -d)
287
288       -T, --timeout=N
289              (Advanced)  Abort  if command does not finish in this time (with
290              --restart, --wait, --force-*)
291
292       -f, --force
293              If making CIB changes, do so regardless of quorum. See help  for
294              individual commands for additional behavior.
295
296   Application Options:
297       -$, --version
298              Display software version and exit
299
300       -V, --verbose
301              Increase debug output (may be specified multiple times)
302
303       -Q, --quiet
304              Be less descriptive in output.
305
306       -r, --resource=ID
307              Resource ID
308

EXAMPLES

310       List the available OCF agents:
311
312              # crm_resource --list-agents ocf
313
314       List the available OCF agents from the linux-ha project:
315
316              # crm_resource --list-agents ocf:heartbeat
317
318       Move 'myResource' to a specific node:
319
320              # crm_resource --resource myResource --move --node altNode
321
322       Allow  (but  not force) 'myResource' to move back to its original loca‐
323       tion:
324
325              # crm_resource --resource myResource --clear
326
327       Stop 'myResource' (and anything that depends on it):
328
329              # crm_resource --resource myResource --set-parameter target-role
330              --meta --parameter-value Stopped
331
332       Tell  the  cluster not to manage 'myResource' (the cluster will not at‐
333       tempt to start or stop the resource  under  any  circumstances;  useful
334       when performing maintenance tasks on a resource):
335
336              #  crm_resource --resource myResource --set-parameter is-managed
337              --meta --parameter-value false
338
339       Erase the operation history of 'myResource'  on  'aNode'  (the  cluster
340       will  'forget'  the  existing resource state, including any errors, and
341       attempt to recover theresource; useful when a resource had failed  per‐
342       manently and has been repaired by an administrator):
343
344              # crm_resource --resource myResource --cleanup --node aNode
345

AUTHOR

347       Written by Andrew Beekhof
348
349
350
351Pacemaker 2.1.2-0.2.rc2.fc35     November 2021                    PACEMAKER(8)
Impressum