.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.4. .TH PACEMAKER "8" "June 2017" "Pacemaker 1.1.16" "System Administration Utilities" .SH NAME Pacemaker \- Part of the Pacemaker cluster resource manager .SH SYNOPSIS .B crm_resource \fI\,(query|command) \/\fR[\fI\,options\/\fR] .SH DESCRIPTION crm_resource \- Perform tasks related to cluster resources. Allows resources to be queried (definition and location), modified, and moved around the cluster. .SH OPTIONS .TP \-?, \fB\-\-help\fR This text .TP \-$, \fB\-\-version\fR Version information .TP \fB\-V\fR, \fB\-\-verbose\fR Increase debug output .TP \fB\-Q\fR, \fB\-\-quiet\fR Print only the value on stdout .TP \fB\-r\fR, \fB\-\-resource\fR=\fI\,value\/\fR Resource ID .SS "Queries:" .TP \fB\-L\fR, \fB\-\-list\fR List all cluster resources .TP \fB\-l\fR, \fB\-\-list\-raw\fR List the IDs of all instantiated resources (no groups/clones/...) .TP \fB\-O\fR, \fB\-\-list\-operations\fR List active resource operations. Optionally filtered by resource (\fB\-r\fR) and/or node (\fB\-N\fR) .TP \fB\-o\fR, \fB\-\-list\-all\-operations\fR List all resource operations. Optionally filtered by resource (\fB\-r\fR) and/or node (\fB\-N\fR) .TP \fB\-\-list\-standards\fR List supported standards .TP \fB\-\-list\-ocf\-providers\fR List all available OCF providers .TP \fB\-\-list\-agents\fR=\fI\,value\/\fR List all agents available for the named standard and/or provider. .TP \fB\-\-list\-ocf\-alternatives\fR=\fI\,value\/\fR List all available providers for the named OCF agent .TP \fB\-\-show\-metadata\fR=\fI\,value\/\fR Show the metadata for the named class:provider:agent .TP \fB\-q\fR, \fB\-\-query\-xml\fR Query the definition of a resource (template expanded) .TP \fB\-w\fR, \fB\-\-query\-xml\-raw\fR Query the definition of a resource (raw xml) .TP \fB\-W\fR, \fB\-\-locate\fR Display the current location(s) of a resource .TP \fB\-A\fR, \fB\-\-stack\fR Display the prerequisites and dependents of a resource .TP \fB\-a\fR, \fB\-\-constraints\fR Display the (co)location constraints that apply to a resource .SS "Commands:" .TP \fB\-C\fR, \fB\-\-cleanup\fR Delete the resource history and re\-check the current state. Optional: \fB\-\-resource\fR .TP \fB\-p\fR, \fB\-\-set\-parameter\fR=\fI\,value\/\fR Set the named parameter for a resource. See also \fB\-m\fR, \fB\-\-meta\fR .TP \fB\-g\fR, \fB\-\-get\-parameter\fR=\fI\,value\/\fR Display the named parameter for a resource. See also \fB\-m\fR, \fB\-\-meta\fR .TP \fB\-d\fR, \fB\-\-delete\-parameter\fR=\fI\,value\/\fR Delete the named parameter for a resource. See also \fB\-m\fR, \fB\-\-meta\fR .SS "Resource location:" .TP \fB\-M\fR, \fB\-\-move\fR Move a resource from its current location to the named destination. Requires: \fB\-\-host\fR. Optional: \fB\-\-lifetime\fR, \fB\-\-master\fR .IP NOTE: This may prevent the resource from running on the previous location node until the implicit constraints expire or are removed with \fB\-\-unban\fR .TP \fB\-B\fR, \fB\-\-ban\fR Prevent the named resource from running on the named \fB\-\-host\fR. Requires: \fB\-\-resource\fR. Optional: \fB\-\-host\fR, \fB\-\-lifetime\fR, \fB\-\-master\fR .TP If \fB\-\-host\fR is not specified, it defaults to: * the current location for primitives and groups, or .IP * the current location of the master for m/s resources with master\-max=1 .IP All other situations result in an error as there is no sane default. .IP NOTE: This will prevent the resource from running on this node until the constraint expires or is removed with \fB\-\-clear\fR .TP \fB\-U\fR, \fB\-\-clear\fR Remove all constraints created by the \fB\-\-ban\fR and/or \fB\-\-move\fR commands. Requires: \fB\-\-resource\fR. Optional: \fB\-\-host\fR, \fB\-\-master\fR .IP If \fB\-\-host\fR is not specified, all constraints created by \fB\-\-ban\fR and \fB\-\-move\fR will be removed for the named resource. .TP \fB\-u\fR, \fB\-\-lifetime\fR=\fI\,value\/\fR Lifespan of constraints created by the \fB\-\-ban\fR and \fB\-\-move\fR commands .TP \fB\-\-master\fR Limit the scope of the \fB\-\-ban\fR, \fB\-\-move\fR and \fB\-\-clear\fR commands to the Master role. For \fB\-\-ban\fR and \fB\-\-move\fR, the previous master can still remain active in the Slave role. .SS "Advanced Commands:" .TP \fB\-D\fR, \fB\-\-delete\fR (Advanced) Delete a resource from the CIB .TP \fB\-F\fR, \fB\-\-fail\fR (Advanced) Tell the cluster this resource has failed .TP \fB\-\-restart\fR (Advanced) Tell the cluster to restart this resource and anything that depends on it .TP \fB\-\-wait\fR (Advanced) Wait until the cluster settles into a stable state .TP \fB\-\-force\-demote\fR (Advanced) Bypass the cluster and demote a resource on the local node. Additional detail with \fB\-V\fR .TP \fB\-\-force\-stop\fR (Advanced) Bypass the cluster and stop a resource on the local node. Additional detail with \fB\-V\fR .TP \fB\-\-force\-start\fR (Advanced) Bypass the cluster and start a resource on the local node. Additional detail with \fB\-V\fR .TP \fB\-\-force\-promote\fR (Advanced) Bypass the cluster and promote a resource on the local node. Additional detail with \fB\-V\fR .TP \fB\-\-force\-check\fR (Advanced) Bypass the cluster and check the state of a resource on the local node. Additional detail with \fB\-V\fR .SS "Additional Options:" .TP \fB\-N\fR, \fB\-\-node\fR=\fI\,value\/\fR Host uname .TP \fB\-\-recursive\fR Follow colocation chains when using \fB\-\-set\-parameter\fR .TP \fB\-t\fR, \fB\-\-resource\-type\fR=\fI\,value\/\fR Resource type (primitive, clone, group, ...) .TP \fB\-v\fR, \fB\-\-parameter\-value\fR=\fI\,value\/\fR Value to use with \fB\-p\fR or \fB\-S\fR .TP \fB\-m\fR, \fB\-\-meta\fR Modify a resource's configuration option rather than one which is passed to the resource agent script. For use with \fB\-p\fR, \fB\-g\fR, \fB\-d\fR .TP \fB\-z\fR, \fB\-\-utilization\fR Modify a resource's utilization attribute. For use with \fB\-p\fR, \fB\-g\fR, \fB\-d\fR .TP \fB\-s\fR, \fB\-\-set\-name\fR=\fI\,value\/\fR (Advanced) ID of the instance_attributes object to change .TP \fB\-i\fR, \fB\-\-nvpair\fR=\fI\,value\/\fR (Advanced) ID of the nvpair object to change/delete .TP \fB\-T\fR, \fB\-\-timeout\fR=\fI\,value\/\fR (Advanced) Abort if command does not finish in this time (with \fB\-\-restart\fR or \fB\-\-wait\fR) .HP \fB\-f\fR, \fB\-\-force\fR .SH EXAMPLES List the configured resources: .IP # crm_resource \-\-list .PP List the available OCF agents: .IP # crm_resource \-\-list\-agents ocf .PP List the available OCF agents from the linux\-ha project: .IP # crm_resource \-\-list\-agents ocf:heartbeat .PP Display the current location of 'myResource': .IP # crm_resource \-\-resource myResource \-\-locate .PP Move 'myResource' to another machine: .IP # crm_resource \-\-resource myResource \-\-move .PP Move 'myResource' to a specific machine: .IP # crm_resource \-\-resource myResource \-\-move \-\-node altNode .PP Allow (but not force) 'myResource' to move back to its original location: .IP # crm_resource \-\-resource myResource \-\-un\-move .PP Tell the cluster that 'myResource' failed: .IP # crm_resource \-\-resource myResource \-\-fail .PP Stop 'myResource' (and anything that depends on it): .IP # crm_resource \-\-resource myResource \-\-set\-parameter target\-role \-\-meta \-\-parameter\-value Stopped .PP Tell the cluster not to manage 'myResource': .PP The cluster will not attempt to start or stop the resource under any circumstances. Useful when performing maintenance tasks on a resource. .IP # crm_resource \-\-resource myResource \-\-set\-parameter is\-managed \-\-meta \-\-parameter\-value false .PP Erase the operation history of 'myResource' on 'aNode': .PP The cluster will 'forget' the existing resource state (including any errors) and attempt to recover the resource. Useful when a resource had failed permanently and has been repaired by an administrator. .IP # crm_resource \-\-resource myResource \-\-cleanup \-\-node aNode .SH AUTHOR Written by Andrew Beekhof .SH "REPORTING BUGS" Report bugs to users@clusterlabs.org