crm_resource — interact with the Cluster Resource Manager
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, -VTurn on debug information.
![]() | |
Increase the level of verbosity by providing additional instances. | |
--quiet, -QPrint only the value on stdout (for use with -W).
--list, -LList all resources.
--query-xml, -xQuery a resource.
Requires: -r
--locate, -WLocate a resource.
Requires: -r
--migrate, -MMigrate a resource from its current location.
Use -H to specify a destination.
If -H 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: -H, -f
--un-migrate, -URemove all constraints created by -M
Requires: -r
--delete, -DDelete a resource from the CIB.
Requires: -r, -t
--cleanup, -CDelete a resource from the LRM.
Requires: -r. Optional: -H
--reprobe, -PRecheck for resources started outside the CRM.
Optional: -H
--refresh, -RRefresh the CIB from the LRM.
Optional: -H
--set-parameter string, -p stringSet the named parameter for a resource.
Requires: -r, -v. Optional: -i, -s
--get-parameter string, -g stringGet the named parameter for a resource.
Requires: -r. Optional: -i, -s
--delete-parameter string, -d stringDelete the named parameter for a resource.
Requires: -r. Optional: -i
--resource string, -r stringSpecify the resource ID.
--resource-type string, -t stringSpecify the resource type (primitive,
clone, group, etc.).
--property-value string, -v stringSpecify the property value.
--host-uname string, -H stringSpecify the hostname.
--metaModify 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 stringLifespan of migration constraints.
--force, -fForce 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