All tasks that should be managed by a cluster must be available as a resource. There are two major groups that should be distinguished: resource agents and STONITH agents. For both categories, you can add your own agents, extending the abilities of the cluster to your own needs.
A cluster sometimes detects that one of the nodes is misbehaving
and needs to remove it. This is called fencing
and is commonly done with a STONITH resource.
All STONITH resources reside in
/usr/lib/stonith/plugins on each
node. Exactly how the agent fences the node varies. Methods include
powering off, rebooting, and shutting down.
To test a configuration, it is sufficient to use the
ssh STONITH agent, which simply powers off
the node. However, because it is impossible to know how SSH might react to
other system problems, this STONITH agent is not a good choice
for a production environment.
To get a list of all currently available STONITH devices (from the software side), use the command stonith -L.
Unfortunately, there is no documentation about writing STONITH agents yet. If you want to write new STONITH agents, consult the examples available in the source of the heartbeat package.