STONITH is the service used by Heartbeat to protect shared data. Heartbeat is capable of controlling a number of network power switches, and can prevent a potentially faulty node from corrupting shared data by using STONITH to cut the power to that node.
With the STONITH service configured properly, Heartbeat does the following if a node fails:
Notices that the node is not sending “I'm alive” packets out to the cluster.
Sends out pre-stop notifications to the other cluster nodes.
These notifications include messages that the failed node will be powered off.
Instructs the STONITH service to power off the failed node.
Sends post-stop notifications to other cluster nodes after successfully powering off the failed node.
These notifications include messages that the failed node will be powered off.
For Heartbeat, STONITH must be configured as a cluster resource. After reviewing Chapter 4, Configuring and Managing Cluster Resources, continue with Configuring STONITH as a Cluster Resource.
Procedure 2.3. Configuring STONITH as a Cluster Resource
Start the HA Management Client and log in to the cluster as described in Section 4.1, “Graphical HA Management Client”.
To generally enable the use of STONITH, select the entry in the left pane and click the tab on the right.
Activate the check box.
From the menu, select + or click the + button.
Choose as the item type.
Specify the (name) for the STONITH resource.
In the section of the window, scroll down and select the type of STONITH device that corresponds to your network power switch.
(Conditional) After selecting a STONITH resource type, a line for that resource type might be added to the section of the screen. If a line is added, click the line once and then click the line again under the heading to open a field where you can add the needed value.
Some STONITH options require you to add parameter values in the parameters section of the page. For example, you may be required to add host names (server names) for each cluster node in your cluster. You can find the hostname for each server using the uname -n command on the server. You can add multiple hostnames in the provided field using a comma or a space to separate the names.
Select the check box. This allows the resource to simultaneously run on multiple cluster nodes.
In the field, enter the number of
instances of STONITH that will run on a given node. This value should
normally be set to 1.
In the field, enter the number of nodes in the cluster that will run the STONITH service. Be mindful of the number of concurrent connections your STONITH device supports.
Enter the .
Click to add the STONITH resource to the cluster. It now appears below the entry in the left pane.
Select the resource in the left pane and click + to start the STONITH resource.
After creating the STONITH resource, you must create location constraints for it. Location constraints determine which nodes STONITH can run on in the cluster. See Constraints on the High Availability Linux Web site.
Starting the STONITH resource will cause it to start on the nodes that have been specified with its resource location constraints.