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              Call the validate-all action of the local given resource
92
93       -C, --cleanup
94              Delete  resource's  history  (including failures) so its current
95              state is rechecked.  Optionally filtered by --resource,  --node,
96              --operation,  and --interval (otherwise all).  Unless --force is
97              specified, resource's group or  clone  (if  any)  will  also  be
98              cleaned
99
100       -p, --set-parameter=value
101              Set  named  parameter  for resource (requires -v).  Use instance
102              attribute unless --meta or --utilization is specified.
103
104       -d, --delete-parameter=value
105              Delete named parameter for  resource.   Use  instance  attribute
106              unless --meta or --utilization is specified.
107
108   Resource location:
109       -M, --move
110              Create  a  constraint  to move resource. If --node is specified,
111              the constraint will be to move to that node, otherwise  it  will
112              be  to  ban the current node.  Unless --force is specified, this
113              will return an error if the resource is already running  on  the
114              specified  node.  If  --force is specified, this will always ban
115              the current node. Optional: --lifetime,  --master.   NOTE:  This
116              may  prevent  the resource from running on its previous location
117              until  the  implicit  constraint  expires  or  is  removed  with
118              --clear.
119
120       -B, --ban
121              Create  a  constraint  to  keep  resource  off a node. Optional:
122              --node, --lifetime,  --master.   NOTE:  This  will  prevent  the
123              resource  from  running  on the affected node until the implicit
124              constraint expires or is removed with --clear.  If --node is not
125              specified,  it  defaults  to  the  node  currently  running  the
126              resource for primitives and  groups,  or  the  master  for  mas‐
127              ter/slave  clones with master-max=1 (all other situations result
128              in an error as there is no sane default).
129
130       -U, --clear
131              Remove all constraints created by the --ban and/or  --move  com‐
132              mands.   Requires:  --resource.  Optional: --node, --master.  If
133              --node is not specified, all constraints created  by  --ban  and
134              --move  will  be  removed  for the named resource. If --node and
135              --force are specified, any constraint created by --move will  be
136              cleared, even if it is not for the specified node.
137
138       -u, --lifetime=value
139              Lifespan (as ISO 8601 duration) of created constraints (with -B,
140              -M) (see https://en.wikipedia.org/wiki/ISO_8601#Durations)
141
142       --master
143              Limit scope of command to the Master role  (with  -B,  -M,  -U).
144              For  -B  and  -M,  the  previous master may remain active in the
145              Slave role.
146
147   Advanced Commands:
148       -D, --delete
149              (Advanced) Delete a resource from the CIB. Required: -t
150
151       -F, --fail
152              (Advanced) Tell the cluster this resource has failed
153
154       --restart
155              (Advanced) Tell the cluster to restart this  resource  and  any‐
156              thing that depends on it
157
158       --wait (Advanced) Wait until the cluster settles into a stable state
159
160       --force-demote
161              (Advanced) Bypass the cluster and demote a resource on the local
162              node.  Unless --force is specified, this will refuse to do so if
163              the  cluster  believes  the resource is a clone instance already
164              running on the local node.
165
166       --force-stop
167              (Advanced) Bypass the cluster and stop a resource on  the  local
168              node.
169
170       --force-start
171              (Advanced)  Bypass the cluster and start a resource on the local
172              node.  Unless --force is specified, this will refuse to do so if
173              the  cluster  believes  the resource is a clone instance already
174              running on the local node.
175
176       --force-promote
177              (Advanced) Bypass the cluster and  promote  a  resource  on  the
178              local node.  Unless --force is specified, this will refuse to do
179              so if the cluster believes the  resource  is  a  clone  instance
180              already running on the local node.
181
182       --force-check
183              (Advanced)  Bypass the cluster and check the state of a resource
184              on the local node.
185
186   Additional Options:
187       -N, --node=value
188              Node name
189
190       --recursive
191              Follow colocation chains when using --set-parameter
192
193       -t, --resource-type=value
194              Resource XML element (primitive, group, etc.) (with -D)
195
196       -v, --parameter-value=value
197              Value to use with -p
198
199       -m, --meta
200              Use resource meta-attribute instead of instance attribute  (with
201              -p, -g, -d)
202
203       -z, --utilization
204              Use resource utilization attribute instead of instance attribute
205              (with -p, -g, -d)
206
207       -n, --operation=value
208              Operation to clear instead of all (with -C -r)
209
210       -I, --interval=value
211              Interval of operation to clear (default 0) (with -C -r -n)
212
213       -s, --set-name=value
214              (Advanced) XML ID of attributes element to use (with -p, -d)
215
216       -i, --nvpair=value
217              (Advanced) XML ID of nvpair element to use (with -p, -d)
218
219       -T, --timeout=value
220              (Advanced) Abort if command does not finish in this  time  (with
221              --restart, --wait, --force-*)
222
223       -f, --force
224              If making CIB changes, do so regardless of quorum.  See help for
225              individual commands for additional behavior.
226

EXAMPLES

228       List the available OCF agents:
229
230              # crm_resource --list-agents ocf
231
232       List the available OCF agents from the linux-ha project:
233
234              # crm_resource --list-agents ocf:heartbeat
235
236       Move 'myResource' to a specific node:
237
238              # crm_resource --resource myResource --move --node altNode
239
240       Allow (but not force) 'myResource' to move back to its  original  loca‐
241       tion:
242
243              # crm_resource --resource myResource --clear
244
245       Stop 'myResource' (and anything that depends on it):
246
247              # crm_resource --resource myResource --set-parameter target-role
248              --meta --parameter-value Stopped
249
250       Tell the cluster not to manage 'myResource':
251
252       The cluster will not attempt to start or stop the  resource  under  any
253       circumstances.  Useful when performing maintenance tasks on a resource.
254
255              #  crm_resource --resource myResource --set-parameter is-managed
256              --meta --parameter-value false
257
258       Erase the operation history of 'myResource' on 'aNode':
259
260       The cluster will 'forget' the existing resource  state  (including  any
261       errors)  and  attempt  to recover the resource.  Useful when a resource
262       had failed permanently and has been repaired by an administrator.
263
264              # crm_resource --resource myResource --cleanup --node aNode
265

AUTHOR

267       Written by Andrew Beekhof
268

REPORTING BUGS

270       Report bugs to users@clusterlabs.org
271
272
273
274Pacemaker 1.1.18-3.el6             June 2018                      PACEMAKER(8)
Impressum