Product SiteDocumentation Site

8.4. Example

For this example, assume we have a chassis containing four nodes and an IPMI device active on Following the steps above would go something like this:
Step 1: Configure the IP address, authentication credentials, etc. in the IPMI device itself.
Step 2: Install the fence-agents-ipmilan package on both nodes.
Step 3: Choose the fence_ipmilan STONITH agent.
Step 4: Obtain the agent’s possible parameters:
[root@pcmk-1 ~]# pcs stonith describe fence_ipmilan
Stonith options for: fence_ipmilan
  ipport: TCP/UDP port to use for connection with device
  inet6_only: Forces agent to use IPv6 addresses only
  ipaddr (required): IP Address or Hostname
  passwd_script: Script to retrieve password
  method: Method to fence (onoff|cycle)
  inet4_only: Forces agent to use IPv4 addresses only
  passwd: Login password or passphrase
  lanplus: Use Lanplus to improve security of connection
  auth: IPMI Lan Auth type.
  cipher: Ciphersuite to use (same as ipmitool -C parameter)
  privlvl: Privilege level on IPMI device
  action (required): Fencing Action
  login: Login Name
  verbose: Verbose mode
  debug: Write debug information to given file
  version: Display version information and exit
  help: Display help and exit
  power_wait: Wait X seconds after issuing ON/OFF
  login_timeout: Wait X seconds for cmd prompt after login
  power_timeout: Test X seconds for status change after ON/OFF
  delay: Wait X seconds before fencing is started
  ipmitool_path: Path to ipmitool binary
  shell_timeout: Wait X seconds for cmd prompt after issuing command
  retry_on: Count of attempts to retry power on
  sudo: Use sudo (without password) when calling 3rd party sotfware.
  stonith-timeout: How long to wait for the STONITH action to complete per a stonith device.
  priority: The priority of the stonith resource. Devices are tried in order of highest priority to lowest.
  pcmk_host_map: A mapping of host names to ports numbers for devices that do not support host names.
  pcmk_host_list: A list of machines controlled by this device (Optional unless pcmk_host_check=static-list).
  pcmk_host_check: How to determine which machines are controlled by the device.
Step 5: pcs cluster cib stonith_cfg
Step 6: Here are example parameters for creating our STONITH resource:
# pcs -f stonith_cfg stonith create ipmi-fencing fence_ipmilan \
      pcmk_host_list="pcmk-1 pcmk-2" ipaddr= login=testuser \
      passwd=acd123 op monitor interval=60s
# pcs -f stonith_cfg stonith
 ipmi-fencing   (stonith:fence_ipmilan):        Stopped
Steps 7-10: Enable STONITH in the cluster:
# pcs -f stonith_cfg property set stonith-enabled=true
# pcs -f stonith_cfg property
Cluster Properties:
 cluster-infrastructure: corosync
 cluster-name: mycluster
 dc-version: 1.1.12-a9c8177
 have-watchdog: false
 stonith-enabled: true
Step 11: pcs cluster cib-push stonith_cfg