A utility to run fence agents
fence_node [OPTIONS] nodename
This utility runs a fence agent against nodename. The agent and args are taken from the running cluster configuration based on cluster.conf(5).
fence_node is a wrapper around the libfence functions: fence_node() and unfence_node(). These libfence functions use libccs to read the node fencing configuration, which means that corosync (with cman and ccs) must be running to use fence_node(8).
The main use for unfencing is with storage/SAN (non-power) agents.
When using power-based fencing agents, the fencing action itself is supposed to turn a node back on after first turning the power off (this happens automatically with a "reboot" action, and needs to be configured explicitly as "off" + "on" otherwise.)
When using storage-based fencing agents, the fencing action is not allowed to re-enable a node after disabling it. Re-enabling a fenced node is only safe once the node has been rebooted. A natural way to re-enable a fenced node's access to storage, is for that node to re-enable the access itself during its startup process. The cman init script calls fence_node -U (nodename defaults to local nodename when unfencing). Unfencing a node without an <unfence> configuration (see below) is a no-op.
The basic differences between fencing and unfencing:
libfence: fence_node(), command line: fence_node nodename
Turns off or disables a node.
Agents run with the default action of "off", "disable" or "reboot".
Performed by a cluster node against another node that fails (by the fenced daemon).
libfence: unfence_node(), command line: fence_node -U nodename
Turns on or enables a node.
Agents run with the explicit action of "on" or "enable".
Performed by a cluster node "against" itself during startup (by the cman init script).
Unfence the node, default local node name.
Show fence agent results, -vv to also show agent args.
Print a help message describing available options, then exit.
Print program version information, then exit.
The Unfencing/unfence_node() configuration is very similar to the Fencing/fence_node() configuration shown in fenced(8). Unfencing is only performed for a node with an <unfence> section:
<clusternode name="node1" nodeid="1"> <fence> </fence> <unfence> </unfence> </clusternode>
The <unfence> section does not contain <method> sections like the <fence> section does. It contains <device> references directly, which mirror the corresponding device sections for <fence>, with the notable addition of the explicit action of "on" or "enable". The same <fencedevice> is referenced by both fence and unfence <device> lines, and the same per-node args should be repeated.
<clusternode name="node1" nodeid="1"> <fence> <method name="1"> <device name="myswitch" foo="x"/> </method> </fence> <unfence> <device name="myswitch" foo="x" action="on"/> </unfence> </clusternode>