Product SiteDocumentation Site

9.4. Example

Assuming we have an chassis containing four nodes and an IPMI device active on, then we would chose the fence_ipmilan driver in step 2 and obtain the following list of parameters
Obtaining a list of STONITH Parameters
# pcs stonith describe fence_ipmilan
Stonith options for: fence_ipmilan
  auth: IPMI Lan Auth type (md5, password, or none)
  ipaddr: IPMI Lan IP to talk to
  passwd: Password (if required) to control power on IPMI device
  passwd_script: Script to retrieve password (if required)
  lanplus: Use Lanplus
  login: Username/Login (if required) to control power on IPMI device
  action: Operation to perform. Valid operations: on, off, reboot, status, list, diag, monitor or metadata
  timeout: Timeout (sec) for IPMI operation
  cipher: Ciphersuite to use (same as ipmitool -C parameter)
  method: Method to fence (onoff or cycle)
  power_wait: Wait X seconds after on/off operation
  delay: Wait X seconds before fencing is started
  privlvl: Privilege level on IPMI device
  verbose: Verbose mode
from which we would create a STONITH resource fragment that might look like this
Sample STONITH Resource
# pcs cluster cib stonith_cfg
# pcs -f stonith_cfg stonith create impi-fencing fence_ipmilan \
      pcmk_host_list="pcmk-1 pcmk-2" ipaddr= login=testuser \
      passwd=acd123 op monitor interval=60s
# pcs -f stonith_cfg stonith
 impi-fencing   (stonith:fence_ipmilan) Stopped
And finally, since we disabled it earlier, we need to re-enable STONITH. At this point we should have the following configuration.
# pcs -f stonith_cfg property set stonith-enabled=true
# pcs -f stonith_cfg property
dc-version: 1.1.8-1.el7-60a19ed12fdb4d5c6a6b6767f52e5391e447fec0
cluster-infrastructure: corosync
no-quorum-policy: ignore
stonith-enabled: true
Now push the configuration into the cluster.
# pcs cluster cib-push stonith_cfg