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 cluster resources.  Allows
13       resources to be queried (definition and location), modified, and  moved
14       around the cluster.
15

OPTIONS

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

EXAMPLES

268       List the available OCF agents:
269
270              # crm_resource --list-agents ocf
271
272       List the available OCF agents from the linux-ha project:
273
274              # crm_resource --list-agents ocf:heartbeat
275
276       Move 'myResource' to a specific node:
277
278              # crm_resource --resource myResource --move --node altNode
279
280       Allow  (but  not force) 'myResource' to move back to its original loca‐
281       tion:
282
283              # crm_resource --resource myResource --clear
284
285       Stop 'myResource' (and anything that depends on it):
286
287              # crm_resource --resource myResource --set-parameter target-role
288              --meta --parameter-value Stopped
289
290       Tell the cluster not to manage 'myResource':
291
292       The  cluster  will  not attempt to start or stop the resource under any
293       circumstances.  Useful when performing maintenance tasks on a resource.
294
295              # crm_resource --resource myResource --set-parameter  is-managed
296              --meta --parameter-value false
297
298       Erase the operation history of 'myResource' on 'aNode':
299
300       The  cluster  will  'forget' the existing resource state (including any
301       errors) and attempt to recover the resource.  Useful  when  a  resource
302       had failed permanently and has been repaired by an administrator.
303
304              # crm_resource --resource myResource --cleanup --node aNode
305

AUTHOR

307       Written by Andrew Beekhof
308

REPORTING BUGS

310       Report bugs to users@clusterlabs.org
311
312
313
314Pacemaker 2.0.3-1.fc32           November 2019                    PACEMAKER(8)
Impressum