This site best when viewed with a modern standards-compliant browser. We recommend Firefox Get Firefox!.

Linux-HA project logo
Providing Open Source High-Availability Software for Linux and other OSes since 1999.

USA Flag UK Flag

Japanese Flag

ホームページ

サイトについて

コンタクト情報

使用条件

協力方法

セキュリティ

This web page is no longer maintained. Information presented here exists only to avoid breaking historical links.
The Project stays maintained, and lives on: see the Linux-HA Reference Documentation.
To get rid of this notice, you may want to browse the old wiki instead.

2010.1.28
追加パッケージ集リニューアル
追加パッケージ集は、こちらから

2008.8.28
RHEL用rpm更新
更新情報はこちらから

2008.8.18
Heartbeat 2.1.4
リリース!
Downloadはこちらから

2007.11.13
Linux-ha-japan日本語ML移植しました

2007.10.5
日本語サイトOPEN
日本語MLも開設しました

2007.10.5
OSC2007 Tokyo/Fall で Heartbeat紹介
発表資料を公開しました

Last site update:
2017-12-13 11:48:09

STONITH Plugins

To see the list of STONITH device types (plugins) that Linux-HA supports for your system, run "stonith -L" which will produce output similar to the following:

apcmaster
apcmastersnmp
apcsmart
baytech
cyclades
external/riloe
external/ssh
ibmbc
ibmhmc
meatware
null
nw_rpc100s
rcd_serial
rps10
ssh
suicide
wti_nps

If you have the hardware to exploit one of the available plugins, you will need to determine what parameters the device requires in order to be successfully configured. To do so, run "stonith -h" which will produce detailed output for all of the available plugins. You are interested in the list of valid parameter names for the STONITH device in question, similar to the following for ibmhmc:

List of valid parameter names for ibmhmc STONITH device:
        ipaddr

Acquire the necessary information to satisfy the listed parameter names. To verify the validity of the information, check it with "stonith -l" to make sure the list of hosts controlled by this plugin is correct. For example, running the R1-style command:

stonith -t ibmhmc -p "9.254.253.252" -l

should produce output similar to the following:

node1
node2
node3

as should the R2-style command:

stonith -t ibmhmc ipaddr=9.254.253.252 -l

If the list of hosts is correct, you are ready to configure your plugin. If not, examine any terminal output and the logs to determine what is amiss.

R1 (legacy) configuration

The following examples are based off the ibmhmc plugin, part of whose -h output is shown above. To configure the plugin on an R1 (legacy) cluster, you will need to use either the stonith or stonith_host directive in ha.cf. For example, to use the stonith directive to configure the ibmhmc device, add a line similar to the following to /etc/ha.d/ha.cf:

stonith ibmhmc /etc/ha.d/ibmhmc.cfg

where /etc/ha.d/ibmhmc.cfg contains a single line with all of the plugin's parameters:

9.254.253.252

To use the stonith_host directive to configure the ibmhmc device, add a line similar to the following to /etc/ha.d/ha.cf:

stonith_host * ibmhmc 9.254.253.252

where all of the plugin's parameters are placed at the end of the line.

Please note that all parameters are accessible to the plugin in name/value form, but in R1 configurations they appear as a list of parameters. They are ordered in the config file or on the stonith_host line according to the ordering specified in the output of the "stonith -h" invocation with any optional parameters defined after required ones.

You are now ready to start Linux-HA and take advantage of your newly configured STONITH device.

R2 configuration

The following example is based off the ibmhmc plugin, part of whose -h output is shown above.

Configuration using the crm shell (Pacemaker >= 1.0)

If you're running Pacemaker 1.x with Openais or Heartbeat 2.99/3.x, use the crm shell to configure fencing.

configure
primitive s1 stonith:ibmhmc \
        params ipaddr=9.254.253.252 \
        op start interval=0s timeout=20s requires=nothing \
        op monitor interval=5s timeout=20s requires=nothing
clone fencing s1 meta clone_max=2 clone_node_max=1 globally-unique=false
commit
quit

Raw (XML) configuration

The following example is based off the ibmhmc plugin, part of whose -h output is shown above. To configure the plugin on an R2 cluster, place lines similar to the following into the <resources> section of your CIB, which is contained in /var/lib/heartbeat/crm/cib.xml:

<clone id="DoFencing">
  <instance_attributes>
    <attributes>
      <nvpair name="clone_max" value="2"/>
      <nvpair name="clone_node_max" value="1"/>
    </attributes>
  </instance_attributes>
  <primitive id="child_DoFencing" class="stonith" type="ibmhmc">
    <operations>
      <op name="monitor" interval="5s" timeout="20s" prereq="nothing"/>
      <op name="start" timeout="20s" prereq="nothing"/>
    </operations>
    <instance_attributes>
      <attributes>
        <nvpair name="ipaddr" value="9.254.253.252"/>
      </attributes>
    </instance_attributes>
  </primitive>
</clone>

Whatever <nvpair> parameters specified in the <attributes> section of the CIB are accessible to the plugin as name/value pairs.

You are now ready to start Linux-HA and take advantage of your newly configured STONITH device.

Make sure that stonith-enabled is set to true in the cluster_property_set section. That is also the default.