STONITH support (snipl for STONITH)

The STONITH implementation is part of the Heartbeat framework of the High Availability Project.

STONITH is usually used as part of this framework but can also be used independently. snipl provides a plug-in to STONITH.

For a general description of the STONITH technology go to linux-ha.org.

Before you begin

  • STONITH requires a configuration file that maps LPARs and z/VM® guest virtual machines to the specifications for the corresponding SE, HMC or z/VM system. The snipl for STONITH configuration file has the same syntax as the snipl configuration file.
  • The SEs, HMCs and z/VM systems you want to work with must be set upfor snipl.

Using stonith

When using stonith commands for Linux® on z/VM or for Linux in LPAR mode you must provide <keyword>=<value> pairs as described for the snipl configuration file. There are two ways to specify this information:
  • On the command line with the stonith command, using the -p option and the snipl_parm keyword.
  • Through a configuration file, using the -p option and the snipl_file keyword.

Unlike snipl, you must specify all parameters in the same way; all parameters on the command line or all parameters in the configuration file.

On z/VM, you must use a configuration file containing a SSL fingerprint for an encrypted connection.

Figure 1. stonith syntax (simplified)

1  stonith  -t lic_vps   -p
2.1  "snipl_param <parameters>"
2.1  "snipl_file <file>"   -T
2.1  on
2.1  off
2.1 reset
1  <image>
Where:
-t lic_vps
specifies the server type. For STONITH with snipl, the server type is always lic_vps.
-p
specifies parameters.
snipl_param <parameters>
specifies comma-separated <keyword>=<value> pairs with the same keywords as used in the configuration file.
For LPAR mode the following keywords are required:
  • server
  • type
  • user (or encryption=no)
  • password
  • image
For z/VM mode the following keywords are required:
  • server
  • port (required if the z/VM system is configured with a SMAPI request server rather than a VSMSERVE service machine)
  • type
  • user
  • password
  • image
snipl_file <parameters>
specifies a configuration file. The configuration file must contain all required keywords, including the password. The configuration file must always be specified explicitly. No file is used by default.
-T
specifies the action to be performed.
-on
activates the specified LPAR or logs on the specified z/VM virtual machine.
-off
deactivates the specified LPAR or logs off the specified z/VM virtual machine.
-reset
resets the specified LPAR or z/VM virtual machine.
<image>
specifies the LPAR or z/VM virtual machine you want to work with. If you use the snipl_param parameter, the contained image keyword must specify the same LPAR or z/VM virtual machine.

For more information, see the stonith man page.

Examples

  • This example command resets the z/VM guest virtual machine sndlnx04:
    # stonith -t lic_vps -p "snipl_param server=sandbox.www.example.com,type=vm\
    ,user=sndadm01,password=pw42play,encryption=no,image=sndlnx04" -T reset sndlnx04
    Note: Instead of using the continuation sign (\) at the end of the first line, you can specify the complete command on a single line.
  • With /etc/xcfg as shown in Example of a snipl configuration file, the following command is equivalent:
    # stonith -t lic_vps -p "snipl_file /etc/xcfg" -T reset sndlnx04