table of contents
other versions
- jessie-backports 1.1.16-1~bpo8+1
- stretch 1.1.16-1
- testing 2.0.1~rc4-1
- unstable 2.0.1~rc5-1
PACEMAKER(8) | System Administration Utilities | PACEMAKER(8) |
NAME¶
Pacemaker - Part of the Pacemaker cluster resource managerSYNOPSIS¶
crm_resource (query|command) [options]DESCRIPTION¶
crm_resource - Perform tasks related to cluster resources. Allows resources to be queried (definition and location), modified, and moved around the cluster.OPTIONS¶
- -?, --help
- This text
- -$, --version
- Version information
- -V, --verbose
- Increase debug output
- -Q, --quiet
- Print only the value on stdout
- -r, --resource=value
- Resource ID
Queries:¶
- -L, --list
- List all cluster resources
- -l, --list-raw
- List the IDs of all instantiated resources (no groups/clones/...)
- -O, --list-operations
- List active resource operations. Optionally filtered by resource (-r) and/or node ( -N)
- -o, --list-all-operations
- List all resource operations. Optionally filtered by resource (-r) and/or node ( -N)
- --list-standards
- List supported standards
- --list-ocf-providers
- List all available OCF providers
- --list-agents=value
- List all agents available for the named standard and/or provider.
- --list-ocf-alternatives=value
- List all available providers for the named OCF agent
- --show-metadata=value
- Show the metadata for the named class:provider:agent
- -q, --query-xml
- Query the definition of a resource (template expanded)
- -w, --query-xml-raw
- Query the definition of a resource (raw xml)
- -W, --locate
- Display the current location(s) of a resource
- -A, --stack
- Display the prerequisites and dependents of a resource
- -a, --constraints
- Display the (co)location constraints that apply to a resource
Commands:¶
- -C, --cleanup
- Delete the resource history and re-check the current state. Optional: --resource
- -p, --set-parameter=value
- Set the named parameter for a resource. See also -m, --meta
- -g, --get-parameter=value
- Display the named parameter for a resource. See also -m, --meta
- -d, --delete-parameter=value
- Delete the named parameter for a resource. See also -m, --meta
Resource location:¶
- -M, --move
- Move a resource from its current location to the named destination. Requires: --host. Optional: --lifetime, --master
- NOTE: This may prevent the resource from running on the previous location node until the implicit constraints expire or are removed with --unban
- -B, --ban
- Prevent the named resource from running on the named --host. Requires: --resource. Optional: --host, --lifetime, --master
- If --host is not specified, it defaults to:
- * the current location for primitives and groups, or
- * the current location of the master for m/s resources with master-max=1
- All other situations result in an error as there is no sane default.
- NOTE: This will prevent the resource from running on this node until the constraint expires or is removed with --clear
- -U, --clear
- Remove all constraints created by the --ban and/or --move commands. Requires: --resource. Optional: --host, --master
- If --host is not specified, all constraints created by --ban and --move will be removed for the named resource.
- -u, --lifetime=value
- Lifespan of constraints created by the --ban and --move commands
- --master
- Limit the scope of the --ban, --move and --clear commands to the Master role. For --ban and --move, the previous master can still remain active in the Slave role.
Advanced Commands:¶
- -D, --delete
- (Advanced) Delete a resource from the CIB
- -F, --fail
- (Advanced) Tell the cluster this resource has failed
- --restart
- (Advanced) Tell the cluster to restart this resource and anything that depends on it
- --wait
- (Advanced) Wait until the cluster settles into a stable state
- --force-demote
- (Advanced) Bypass the cluster and demote a resource on the local node. Additional detail with -V
- --force-stop
- (Advanced) Bypass the cluster and stop a resource on the local node. Additional detail with -V
- --force-start
- (Advanced) Bypass the cluster and start a resource on the local node. Additional detail with -V
- --force-promote
- (Advanced) Bypass the cluster and promote a resource on the local node. Additional detail with -V
- --force-check
- (Advanced) Bypass the cluster and check the state of a resource on the local node. Additional detail with -V
Additional Options:¶
- -N, --node=value
- Host uname
- --recursive
- Follow colocation chains when using --set-parameter
- -t, --resource-type=value
- Resource type (primitive, clone, group, ...)
- -v, --parameter-value=value
- Value to use with -p or -S
- -m, --meta
- Modify a resource's configuration option rather than one which is passed to the resource agent script. For use with -p, -g, -d
- -z, --utilization
- Modify a resource's utilization attribute. For use with -p, -g, -d
- -s, --set-name=value
- (Advanced) ID of the instance_attributes object to change
- -i, --nvpair=value
- (Advanced) ID of the nvpair object to change/delete
- -T, --timeout=value
- (Advanced) Abort if command does not finish in this time (with --restart or --wait)
-f, --force
EXAMPLES¶
List the configured resources:- # crm_resource --list
- # crm_resource --list-agents ocf
- # crm_resource --list-agents ocf:heartbeat
- # crm_resource --resource myResource --locate
- # crm_resource --resource myResource --move
- # crm_resource --resource myResource --move --node altNode
- # crm_resource --resource myResource --un-move
- # crm_resource --resource myResource --fail
- # crm_resource --resource myResource --set-parameter target-role --meta --parameter-value Stopped
- # crm_resource --resource myResource --set-parameter is-managed --meta --parameter-value false
- # crm_resource --resource myResource --cleanup --node aNode
AUTHOR¶
Written by Andrew BeekhofREPORTING BUGS¶
Report bugs to users@clusterlabs.orgJune 2017 | Pacemaker 1.1.16 |