.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. .TH PACEMAKER "8" "January 2021" "Pacemaker 2.0.5" "System Administration Utilities" .SH NAME Pacemaker \- Part of the Pacemaker cluster resource manager .SH SYNOPSIS crm_resource | [options] .SH DESCRIPTION crm_resource \- perform tasks related to Pacemaker cluster resources .SH OPTIONS .SS "Help Options:" .TP \fB\-h\fR, \fB\-\-help\fR Show help options .TP \fB\-\-help\-all\fR Show all help options .TP \fB\-\-help\-queries\fR Show query help .TP \fB\-\-help\-commands\fR Show command help .TP \fB\-\-help\-locations\fR Show location help .TP \fB\-\-help\-validate\fR Show validate help .TP \fB\-\-help\-advanced\fR Show advanced option help .TP \fB\-\-help\-additional\fR Show additional options .SS "Queries:" .TP \fB\-L\fR, \fB\-\-list\fR List all cluster resources with status .TP \fB\-l\fR, \fB\-\-list\-raw\fR List IDs of all instantiated resources (individual members rather than groups etc.) .TP \fB\-O\fR, \fB\-\-list\-operations\fR List active resource operations, optionally filtered by \fB\-\-resource\fR and/or \fB\-\-node\fR .TP \fB\-o\fR, \fB\-\-list\-all\-operations\fR List all resource operations, optionally filtered by \fB\-\-resource\fR and/or \fB\-\-node\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\,STD\/\fR/PROV List all agents available for the named standard and/or provider .TP \fB\-\-list\-ocf\-alternatives\fR=\fI\,AGENT\/\fR List all available providers for the named OCF agent .TP \fB\-\-show\-metadata\fR=\fI\,SPEC\/\fR Show the metadata for the named class:provider:agent .TP \fB\-q\fR, \fB\-\-query\-xml\fR Show XML configuration of resource (after any template expansion) .TP \fB\-w\fR, \fB\-\-query\-xml\-raw\fR Show XML configuration of resource (before any template expansion) .TP \fB\-g\fR, \fB\-\-get\-parameter\fR=\fI\,PARAM\/\fR Display named parameter for resource (use instance attribute unless \fB\-\-meta\fR or \fB\-\-utilization\fR is specified) .TP \fB\-W\fR, \fB\-\-locate\fR Show node(s) currently running resource .TP \fB\-A\fR, \fB\-\-stack\fR Display the (co)location constraints that apply to a resource and the resources is it colocated with .TP \fB\-a\fR, \fB\-\-constraints\fR Display the (co)location constraints that apply to a resource .TP \fB\-Y\fR, \fB\-\-why\fR Show why resources are not running, optionally filtered by \fB\-\-resource\fR and/or \fB\-\-node\fR .SS "Commands:" .TP \fB\-\-validate\fR Validate resource configuration by calling agent's validate\-all action. The configuration may be specified either by giving an existing resource name with \fB\-r\fR, or by specifying \fB\-\-class\fR, \fB\-\-agent\fR, and \fB\-\-provider\fR arguments, along with any number of \fB\-\-option\fR arguments. .TP \fB\-C\fR, \fB\-\-cleanup\fR If resource has any past failures, clear its history and fail count. Optionally filtered by \fB\-\-resource\fR, \fB\-\-node\fR, \fB\-\-operation\fR and \fB\-\-interval\fR (otherwise all). \fB\-\-operation\fR and \fB\-\-interval\fR apply to fail counts, but entire history is always clear, to allow current state to be rechecked. If the named resource is part of a group, or one numbered instance of a clone or bundled resource, the clean\-up applies to the whole collective resource unless \fB\-\-force\fR is given. .TP \fB\-R\fR, \fB\-\-refresh\fR Delete resource's history (including failures) so its current state is rechecked. Optionally filtered by \fB\-\-resource\fR and \fB\-\-node\fR (otherwise all). If the named resource is part of a group, or one numbered instance of a clone or bundled resource, the refresh applies to the whole collective resource unless \fB\-\-force\fR is given. .TP \fB\-p\fR, \fB\-\-set\-parameter\fR=\fI\,PARAM\/\fR Set named parameter for resource (requires \fB\-v\fR). Use instance attribute unless \fB\-\-meta\fR or \fB\-\-utilization\fR is specified. .TP \fB\-d\fR, \fB\-\-delete\-parameter\fR=\fI\,PARAM\/\fR Delete named parameter for resource. Use instance attribute unless \fB\-\-meta\fR or \fB\-\-utilization\fR is specified. .SS "Locations:" .TP \fB\-M\fR, \fB\-\-move\fR Create a constraint to move resource. If \fB\-\-node\fR is specified, the constraint will be to move to that node, otherwise it will be to ban the current node. Unless \fB\-\-force\fR is specified this will return an error if the resource is already running on the specified node. If \fB\-\-force\fR is specified, this will always ban the current node. Optional: \fB\-\-lifetime\fR, \fB\-\-master\fR. NOTE: This may prevent the resource from running on its previous location until the implicit constraint expires or is removed with \fB\-\-clear\fR. .TP \fB\-B\fR, \fB\-\-ban\fR Create a constraint to keep resource off a node. Optional: \fB\-\-node\fR, \fB\-\-lifetime\fR, \fB\-\-master\fR. NOTE: This will prevent the resource from running on the affected node until the implicit constraint expires or is removed with \fB\-\-clear\fR. If \fB\-\-node\fR is not specified, it defaults to the node currently running the resource for primitives and groups, or the master for promotable clones with promoted\-max=1 (all other situations result in an error as there is no sane default). .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\-\-node\fR, \fB\-\-master\fR, \fB\-\-expired\fR. If \fB\-\-node\fR is not specified, all constraints created by \fB\-\-ban\fR and \fB\-\-move\fR will be removed for the named resource. If \fB\-\-node\fR and \fB\-\-force\fR are specified, any constraint created by \fB\-\-move\fR will be cleared, even if it is not for the specified node. If \fB\-\-expired\fR is specified, only those constraints whose lifetimes have expired will be removed. .TP \fB\-e\fR, \fB\-\-expired\fR Modifies the \fB\-\-clear\fR argument to remove constraints with expired lifetimes. .TP \fB\-u\fR, \fB\-\-lifetime\fR=\fI\,TIMESPEC\/\fR Lifespan (as ISO 8601 duration) of created constraints (with \fB\-B\fR, \fB\-M\fR) see https://en.wikipedia.org/wiki/ISO_8601#Durations) .TP \fB\-\-master\fR Limit scope of command to Master role (with \fB\-B\fR, \fB\-M\fR, \fB\-U\fR). For \fB\-B\fR and \fB\-M\fR the previous master may remain active in the Slave role. .SS "Validate:" .TP \fB\-\-class\fR=\fI\,CLASS\/\fR The standard the resource agent confirms to (for example, ocf). Use with \fB\-\-agent\fR, \fB\-\-provider\fR, \fB\-\-option\fR, and \fB\-\-validate\fR. .TP \fB\-\-agent\fR=\fI\,AGENT\/\fR The agent to use (for example, IPaddr). Use with \fB\-\-class\fR, \fB\-\-provider\fR, \fB\-\-option\fR, and \fB\-\-validate\fR. .TP \fB\-\-provider\fR=\fI\,PROVIDER\/\fR The vendor that supplies the resource agent (for example, heartbeat). Use with \fB\-\-class\fR, \fB\-\-agent\fR, \fB\-\-option\fR, and \fB\-\-validate\fR. .TP \fB\-\-option\fR=\fI\,PARAM\/\fR Specify a device configuration parameter as NAME=VALUE (may be specified multiple times). Use with \fB\-\-validate\fR and without the \fB\-r\fR option. .SS "Advanced:" .TP \fB\-D\fR, \fB\-\-delete\fR (Advanced) Delete a resource from the CIB. Required: \fB\-t\fR .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. Unless \fB\-\-force\fR is specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node. .TP \fB\-\-force\-stop\fR (Advanced) Bypass the cluster and stop a resource on the local node .TP \fB\-\-force\-start\fR (Advanced) Bypass the cluster and start a resource on the local node. Unless \fB\-\-force\fR is specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node. .TP \fB\-\-force\-promote\fR (Advanced) Bypass the cluster and promote a resource on the local node. Unless \fB\-\-force\fR is specified, this will refuse to do so if the cluster believes the resource is a clone instance already running on the local node. .TP \fB\-\-force\-check\fR (Advanced) Bypass the cluster and check the state of a resource on the local node .SS "Additional Options:" .TP \fB\-N\fR, \fB\-\-node\fR=\fI\,NAME\/\fR Node name .TP \fB\-\-recursive\fR Follow colocation chains when using \fB\-\-set\-parameter\fR .TP \fB\-t\fR, \fB\-\-resource\-type\fR=\fI\,ELEMENT\/\fR Resource XML element (primitive, group, etc.) (with \fB\-D\fR) .TP \fB\-v\fR, \fB\-\-parameter\-value\fR=\fI\,PARAM\/\fR Value to use with \fB\-p\fR .TP \fB\-m\fR, \fB\-\-meta\fR Use resource meta\-attribute instead of instance attribute (with \fB\-p\fR, \fB\-g\fR, \fB\-d\fR) .TP \fB\-z\fR, \fB\-\-utilization\fR Use resource utilization attribute instead of instance attribute (with \fB\-p\fR, \fB\-g\fR, \fB\-d\fR) .TP \fB\-n\fR, \fB\-\-operation\fR=\fI\,OPERATION\/\fR Operation to clear instead of all (with \fB\-C\fR \fB\-r\fR) .TP \fB\-I\fR, \fB\-\-interval\fR=\fI\,N\/\fR Interval of operation to clear (default 0) (with \fB\-C\fR \fB\-r\fR \fB\-n\fR) .TP \fB\-s\fR, \fB\-\-set\-name\fR=\fI\,ID\/\fR (Advanced) XML ID of attributes element to use (with \fB\-p\fR, \fB\-d\fR) .TP \fB\-i\fR, \fB\-\-nvpair\fR=\fI\,ID\/\fR (Advanced) XML ID of nvpair element to use (with \fB\-p\fR, \fB\-d\fR) .TP \fB\-T\fR, \fB\-\-timeout\fR=\fI\,N\/\fR (Advanced) Abort if command does not finish in this time (with \fB\-\-restart\fR, \fB\-\-wait\fR, \fB\-\-force\-\fR*) .TP \fB\-f\fR, \fB\-\-force\fR If making CIB changes, do so regardless of quorum. See help for individual commands for additional behavior. .SS "Application Options:" .TP \-$, \fB\-\-version\fR Display software version and exit .TP \fB\-V\fR, \fB\-\-verbose\fR Increase debug output (may be specified multiple times) .TP \fB\-Q\fR, \fB\-\-quiet\fR Be less descriptive in output. .TP \fB\-r\fR, \fB\-\-resource\fR=\fI\,ID\/\fR Resource ID .SH EXAMPLES 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 Move 'myResource' to a specific node: .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 \-\-clear .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' (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' (the cluster will 'forget' the existing resource state, including any errors, and attempt to recover theresource; 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