crm_resource — Perform tasks related to cluster resources
The crm_resource command performs various resource-related actions on the cluster. It can modify the definition of configured resources, start and stop resources, and delete and migrate resources between nodes.
--help, -?
Print the help message.
--verbose, -V
Turn on debug information.
![]() | |
Increase the level of verbosity by providing additional instances. | |
--quiet, -Q
Print only the value on stdout (for use with -W).
--list, -L
List all resources.
--query-xml, -x
Query a resource.
Requires: -r
--locate, -W
Locate a resource.
Requires: -r
--migrate, -M
Migrate a resource from its current location. Use -N
to specify a destination.
If -N is not specified, the resource is forced to
move by creating a rule for the current location and a score of
-INFINITY.
![]() | |
This prevents the resource from running on this node until the
constraint is removed with | |
Requires: -r, Optional: -N,
-f
--un-migrate, -U
Remove all constraints created by -M
Requires: -r
--delete, -D
Delete a resource from the CIB.
Requires: -r, -t
--cleanup, -C
Delete a resource from the LRM.
Requires: -r. Optional: -H
--reprobe, -P
Recheck for resources started outside the CRM.
Optional: -H
--refresh, -R
Refresh the CIB from the LRM.
Optional: -H
--set-parameter string, -p string
Set the named parameter for a resource.
Requires: -r, -v. Optional:
-i, -s, and --meta
--get-parameter string, -g string
Get the named parameter for a resource.
Requires: -r. Optional: -i,
-s, and --meta
--delete-parameter string, -d string
Delete the named parameter for a resource.
Requires: -r. Optional: -i, and
--meta
--list-operations string
, -O string
List the active resource operations. Optionally filtered by resource,
node, or both. Optional: -N, -r
--list-all-operations string
, -o string
List all resource operations. Optionally filtered by resource, node,
or both. Optional: -N, -r
--resource string, -r string
Specify the resource ID.
--resource-type string, -t string
Specify the resource type (primitive,
clone, group, etc.).
--property-value string, -v string
Specify the property value.
--node string, -N string
Specify the hostname.
--meta
Modify a resource's configuration option rahter than one which is
passed to the resouce agent script. For use with -p,
-g and -d.
--lifetime
string,
-u string
Lifespan of migration constraints.
--force, -f
Force the resource to move by creating a rule for the current location
and a score of -INFINITY
This should be used if the resource's stickiness and constraint scores
total more than INFINITY (currently 100,000).
![]() | |
This prevents the resource from running on this node until the
constraint is removed with | |
-s string
(Advanced Use Only) Specify the ID of the
instance_attributes object to change.
-i string
(Advanced Use Only) Specify the ID of the nvpair
object to change or delete.
crm_resource -Lcrm_resource-W-rmy_first_ip
If the my_first_ip resource is running, the output
of this command reveals the node on which it is running. If it is not
running, the output shows this.
crm_resource-rmy_first_ip-ptarget_role-vstarted
crm_resource-rmy_first_ip-ptarget_role-vstopped
crm_resource-Q-rmy_first_ip
crm_resource-M-rmy_first_ip
crm_resource-M-rmy_first_ip-Hc001n02
crm_resource-U-rmy_first_ip
![]() | |
The values of | |
crm_resource-D-rmy_first_ip-tprimitive
crm_resource-D-rmy_first_group-tgroup
crm_resource-pis-managed-rmy_first_ip-tprimitive-voff
crm_resource-pis-managed-rmy_first_ip-tprimitive-von
crm_resource-C-Hc001n02-rmy_first_ip
crm_resource -P
crm_resource-P-Hc001n02