Using SBD with Pacemaker

Overview
SBD (Storage-Based Death) allows Pacemaker to use a watchdog device to halt a node.

While its name derives from using shared storage for coordination, shared storage is not required to use it with Pacemaker.

SBD support is relatively new in Pacemaker, and this document applies to the upstream master branch. Released versions of Pacemaker may not support all features described on this page.

This document uses RHEL commands as examples, but the concepts should apply to any distribution.

Basic
With this configuration, sbd will watch for corosync and/or pacemaker failures, and panic the node for safety, but there is no autorecovery:

chkconfig on sbd service sbd start
 * Always check that the SBD watchdog device (SBD_WATCHDOG_DEV in /etc/sysconfig/sbd) actually exists before starting sbd.
 * Enable sbd. There are two flavors of SBD, sbd for cluster nodes, and sbd_remote for Pacemaker Remote nodes. Here we use sbd as an example, but for Pacemaker Remote nodes, replace sbd with sbd_remote:

To disable: chkconfig off sbd service sbd stop

Standard
With this configuration, in addition to the basic functionality, the remaining cluster will assume services are stopped after a specified amount of time and recover them:

pcs property set stonith-watchdog-timeout=${interval}
 * Configure the basic setup on every node as described above.
 * Select a recovery interval (in seconds) that is greater than SBD_WATCHDOG_TIMEOUT in /etc/sysconfig/sbd.
 * Enable cluster recovery, replacing ${interval} with the desired number of seconds:

Critical: Do not set stonith-watchdog-timeout until sbd is configured and running on every node (including Pacemaker Remote nodes).

To disable: pcs property set stonith-watchdog-timeout=0

Critical: Do not stop sbd or sbd_remote anywhere until stonith-watchdog-timeout has been unset/deleted.

Advanced
With this configuration, in addition to the basic and standard functionality, the cluster will use shared storage as a disk-based poison pill:

sed -i s@SBD_DEVICE.*@SBD_DEVICE=/dev/whatever@ /etc/sysconfig/sbd
 * Configure SBD with the device used as shared storage, replacing whatever with the actual device:
 * Configure the basic and standard setup as above.