Product SiteDocumentation Site

11.3. Configuring STONITH

  1. Find the correct driver: stonith -L
  2. Since every device is different, the parameters needed to configure it will vary. To find out the parameters required by the device: stonith -t type -n
    Hopefully the developers chose names that make sense, if not you can query for some additional information by finding an active cluster node and running:
    lrmadmin -M stonith type pacemaker
    The output should be XML formatted text containing additional parameter descriptions
  3. Create a file called stonith.xml containing a primitive resource with a class of stonith, a type of type and a parameter for each of the values returned in step 2
  4. Create a clone from the primitive resource if the device can shoot more than one node and supports multiple simultaneous connections.
  5. Upload it into the CIB using cibadmin: cibadmin -C -o resources --xml-file stonith.xml

11.3.1. Example

Assuming we have an IBM BladeCenter consisting of four nodes and the management interface is active on 10.0.0.1, then we would chose the external/ibmrsa driver in step 2 and obtain the following list of parameters
	     stonith -t external/ibmrsa -n 
	     hostname ipaddr userid passwd type 
Figure 11.1. Obtaining a list of STONITH Parameters

from which we would create a STONITH resource fragment that might look like this
Example 11.1. Sample STONITH Resource

      <clone id="Fencing">
       <meta_attributes id="fencing">
         <nvpair id="Fencing-unique" name="globally-unique" value="false"/>
       </meta_attributes>
       <primitive id="rsa" class="stonith" type="external/ibmrsa">
        <operations>
         <op id="rsa-mon-1" name="monitor" interval="120s"/>
        </operations>
        <instance_attributes id="rsa-parameters">
          <nvpair id="rsa-attr-1" name="hostname" value="node1 node2 node3 node4"/>
          <nvpair id="rsa-attr-1" name="ipaddr" value="10.0.0.1"/>
          <nvpair id="rsa-attr-1" name="userid" value="testuser"/>
          <nvpair id="rsa-attr-1" name="passwd" value="abc123"/>
          <nvpair id="rsa-attr-1" name="type" value="ibm"/>
        </instance_attributes>
       </primitive>
      </clone>