STONITH (Shoot The Other Node in the Head) is a fencing technique for remotely powering down a node in a cluster. LifeKeeper can provide STONITH capabilities by using external power switch controls, IPMI-enabled motherboard controls and hypervisor-provided power capabilities to power off the other nodes in a cluster.
Using IPMI with STONITH
IPMI (Intelligent Platform Management Interface) defines a set of common interfaces to a computer system which can be used to monitor system health and manage the system. Used with STONITH, it allows the cluster software to instruct the switch via a serial or network connection to power off or reboot a cluster node that appears to have died thus ensuring that the unhealthy node cannot access or corrupt any shared data.
- IPMI tools package (e.g. ipmitool-1.8.11-6.el6.x86_64.rpm)
STONITH in VMware vSphere Environments
vCLI (vSphere Command-Line Interface) is a command-line interface supported by VMware for managing your virtual infrastructure including the ESXi hosts and virtual machines. You can choose the vCLI command best suited for your needs and apply it for your LifeKeeper STONITH usage between VMware virtual machines.
- VMware vSphere SDK Package or VMware vSphere CLI. (vSphere CLI is included in the same installation package as the vSphere SDK).
Monitored Virtual Machine
- VMware Tools
Installation and Configuration
After installing LifeKeeper and configuring communication paths for each node in the cluster, install and configure STONITH.
- Install the LifeKeeper STONITH script by running the following command:
- (*For IPMI usage only) Using BIOS or the ipmitool command, set the following BMC (Baseboard Management Controller) variables:
- Use Static IP
- IP address
- Sub netmask
- User name
- Add Administrator privilege level to the user
- Enable network access to the user
Example using ipmitool command
(For detailed information, see the ipmitool man page.)
| # ipmitool lan set 1 ipsrc static
# ipmitool lan set 1 ipaddr 192.168.0.1
# ipmitool lan set 1 netmask 255.0.0.0
# ipmitool user set name 1 root
# ipmitool user set password 1 secret
# ipmitool user priv 1 4
# ipmitool user enable 1
- Edit the configuration file.
Update the configuration file to enable STONITH and add the power off command line.
| # LifeKeeper STONITH configuration
# Each system in the cluster is listed below. To enable STONITH for a
# given system,
# remove the ‘#’ on that line and insert the STONITH command line to power off
# that system.
vSphere CLI commands run on top of vSphere SDK for Perl.
To find the configuration file path:
Type the following command:
vmware-cmd -H <vmware host> -l
This will return a list of VMware hosts.
Example output from vmware-cmd -l with three vms listed:
Find the VM being configured in the resulting list.
Paste the path name into the
variable. The example above would then become:
vmware-cmd -H 10.0.0.1 -U root -P secret /vmfs/volumes/4e08c1b9-d741c09c-1d3e-0019b9cb28be/lampserver/lampserver.vmx stop hard
When LifeKeeper detects a communication failure with a node, that node will be powered off and a failover will occur. Once the issue is repaired, the node will have to be manually powered on.