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 --element, --meta, or --utilization is specified)
92
93       -W, --locate
94              Show node(s) currently running resource
95
96       -a, --constraints
97              Display  the location and colocation constraints that apply to a
98              resource, and if --recursive is specified, to the resources  di‐
99              rectly  or  indirectly  involved  in  those colocations.  If the
100              named resource is part of a group, or  a  clone  or  bundle  in‐
101              stance,  constraints  for  the collective resource will be shown
102              unless --force is given.
103
104       -A, --stack
105              Equivalent to --constraints --recursive
106
107       -Y, --why
108              Show why resources are not running, optionally filtered by --re‐
109              source and/or --node
110
111   Commands:
112       --validate=LEVEL
113              Validate  resource configuration by calling agent's validate-all
114              action. The configuration may be specified either by  giving  an
115              existing  resource  name  with  -r,  or  by  specifying --class,
116              --agent, and --provider arguments,  along  with  any  number  of
117              --option  arguments.  An optional LEVEL argument can be given to
118              control the level of checking performed.
119
120       -C, --cleanup
121              If resource has any past failures, clear its  history  and  fail
122              count.  Optionally  filtered  by --resource, --node, --operation
123              and --interval (otherwise all). --operation and --interval apply
124              to  fail  counts,  but  entire history is always clear, to allow
125              current state to be rechecked. If the named resource is part  of
126              a  group,  or  one  numbered  instance of a clone or bundled re‐
127              source, the clean-up applies to the  whole  collective  resource
128              unless --force is given.
129
130       -R, --refresh
131              Delete  resource's  history  (including failures) so its current
132              state is rechecked. Optionally filtered by --resource and --node
133              (otherwise  all).  If  the named resource is part of a group, or
134              one numbered instance of a clone or bundled  resource,  the  re‐
135              fresh applies to the whole collective resource unless --force is
136              given.
137
138       -p, --set-parameter=PARAM
139              Set named parameter for resource (requires -v). Use instance at‐
140              tribute unless --element, --meta, or --utilization is specified.
141
142       -d, --delete-parameter=PARAM
143              Delete  named parameter for resource. Use instance attribute un‐
144              less --element, --meta or, --utilization is specified.
145
146   Locations:
147       -M, --move
148              Create a constraint to move resource. If  --node  is  specified,
149              the  constraint  will be to move to that node, otherwise it will
150              be to ban the current node. Unless  --force  is  specified  this
151              will  return  an error if the resource is already running on the
152              specified node. If --force is specified, this  will  always  ban
153              the  current node.  Optional: --lifetime, --promoted. NOTE: This
154              may prevent the resource from running on its  previous  location
155              until  the  implicit  constraint  expires  or  is  removed  with
156              --clear.
157
158       -B, --ban
159              Create a constraint to keep  resource  off  a  node.   Optional:
160              --node, --lifetime, --promoted.  NOTE: This will prevent the re‐
161              source from running on the affected node until the implicit con‐
162              straint  expires  or  is  removed with --clear. If --node is not
163              specified, it defaults to the node  currently  running  the  re‐
164              source  for  primitives  and groups, or the promoted instance of
165              promotable clones with promoted-max=1 (all other situations  re‐
166              sult in an error as there is no sane default).
167
168       -U, --clear
169              Remove  all  constraints created by the --ban and/or --move com‐
170              mands. Requires: --resource. Optional: --node, --promoted, --ex‐
171              pired.  If  --node  is not specified, all constraints created by
172              --ban and --move will be removed  for  the  named  resource.  If
173              --node  and  --force  are  specified,  any constraint created by
174              --move will be cleared, even if it  is  not  for  the  specified
175              node.  If  --expired  is specified, only those constraints whose
176              lifetimes have expired will be removed.
177
178       -e, --expired
179              Modifies the --clear argument to remove constraints with expired
180              lifetimes.
181
182       -u, --lifetime=TIMESPEC
183              Lifespan (as ISO 8601 duration) of created constraints (with -B,
184              -M) see https://en.wikipedia.org/wiki/ISO_8601#Durations)
185
186       --promoted
187              Limit scope of command to promoted role (with -B, -M,  -U).  For
188              -B  and  -M,  previously promoted instances may remain active in
189              the unpromoted role.
190
191       --master
192              Deprecated: Use --promoted instead
193
194   Advanced:
195       -D, --delete
196              (Advanced) Delete a resource from the CIB. Required: -t
197
198       -F, --fail
199              (Advanced) Tell the cluster this resource has failed
200
201       --restart
202              (Advanced) Tell the cluster to restart this  resource  and  any‐
203              thing that depends on it
204
205       --wait (Advanced) Wait until the cluster settles into a stable state
206
207       --digests
208              (Advanced)  Show  parameter hashes that Pacemaker uses to detect
209              configuration changes (only accurate if there is  resource  his‐
210              tory  on the specified node). Required: --resource, --node.  Op‐
211              tional: any NAME=VALUE parameters will be used to  override  the
212              configuration  (to  see  what  the  hash  would  be  with  those
213              changes).
214
215       --force-demote
216              (Advanced) Bypass the cluster and demote a resource on the local
217              node.  Unless --force is specified, this will refuse to do so if
218              the cluster believes the resource is a  clone  instance  already
219              running on the local node.
220
221       --force-stop
222              (Advanced)  Bypass  the cluster and stop a resource on the local
223              node
224
225       --force-start
226              (Advanced) Bypass the cluster and start a resource on the  local
227              node.  Unless --force is specified, this will refuse to do so if
228              the cluster believes the resource is a  clone  instance  already
229              running on the local node.
230
231       --force-promote
232              (Advanced)  Bypass the cluster and promote a resource on the lo‐
233              cal node. Unless --force is specified, this will refuse to do so
234              if the cluster believes the resource is a clone instance already
235              running on the local node.
236
237       --force-check=LEVEL
238              (Advanced) Bypass the cluster and check the state of a  resource
239              on  the  local  node. An optional LEVEL argument can be given to
240              control the level of checking performed.
241
242   Additional Options:
243       -N, --node=NAME
244              Node name
245
246       --recursive
247              Follow colocation chains when using  --set-parameter  or  --con‐
248              straints
249
250       -t, --resource-type=ELEMENT
251              Resource XML element (primitive, group, etc.) (with -D)
252
253       -v, --parameter-value=PARAM
254              Value to use with -p
255
256       -m, --meta
257              Use  resource meta-attribute instead of instance attribute (with
258              -p, -g, -d)
259
260       -z, --utilization
261              Use resource utilization attribute instead of instance attribute
262              (with -p, -g, -d)
263
264       --element
265              Use  resource  element  attribute  instead of instance attribute
266              (with -p, -g, -d)
267
268       -n, --operation=OPERATION
269              Operation to clear instead of all (with -C -r)
270
271       -I, --interval=N
272              Interval of operation to clear (default 0) (with -C -r -n)
273
274       --class=CLASS
275              The standard the resource agent conforms to (for example,  ocf).
276              Use with --agent, --provider, --option, and --validate.
277
278       --agent=AGENT
279              The  agent  to  use  (for  example,  IPaddr).  Use with --class,
280              --provider, --option, and --validate.
281
282       --provider=PROVIDER
283              The vendor that supplies the resource agent (for example, heart‐
284              beat). Use with --class, --agent, --option, and --validate.
285
286       --option=PARAM
287              Specify  a  device configuration parameter as NAME=VALUE (may be
288              specified multiple times). Use with --validate and  without  the
289              -r option.
290
291       -s, --set-name=ID
292              (Advanced) XML ID of attributes element to use (with -p, -d)
293
294       -i, --nvpair=ID
295              (Advanced) XML ID of nvpair element to use (with -p, -d)
296
297       -T, --timeout=N
298              (Advanced)  Abort  if command does not finish in this time (with
299              --restart, --wait, --force-*)
300
301       -f, --force
302              Force the action to be performed. See help for  individual  com‐
303              mands for additional behavior.
304
305   Application Options:
306       -$, --version
307              Display software version and exit
308
309       -V, --verbose
310              Increase debug output (may be specified multiple times)
311
312       -Q, --quiet
313              Be less descriptive in output.
314
315       -r, --resource=ID
316              Resource ID
317

EXAMPLES

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

AUTHOR

356       Written by Andrew Beekhof and the Pacemaker project contributors
357
358
359
360Pacemaker 2.1.7-0.3.rc2.fc38     November 2023                    PACEMAKER(8)
Impressum