How do I list and test available watchdog devices to use with SBD in a RHEL 8 Pacemaker cluster?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux (RHEL) 8 with the High Availability Add-on

Issue

  • Which watchdog devices can I use with SBD, and how do I test them?

Resolution

Listing watchdog devices


Use the `pcs stonith sbd watchdog list` command to print a list of available watchdog devices.
# pcs stonith sbd watchdog list
Available watchdog(s):
  /dev/watchdog
  /dev/watchdog0
  /dev/watchdog1

For more information on the identity and settings of each watchdog, use the wdctl command. Note that /dev/watchdog0 should point to the same physical device as /dev/watchdog.

# wdctl
Device:        /dev/watchdog
Identity:      i6300ESB timer [version 0]
Timeout:       30 seconds
Pre-timeout:    0 seconds
FLAG           DESCRIPTION               STATUS BOOT-STATUS
KEEPALIVEPING  Keep alive ping reply          1           0
MAGICCLOSE     Supports magic close char      1           0
SETTIMEOUT     Set timeout (in seconds)       0           0
 
# wdctl /dev/watchdog0
Device:        /dev/watchdog0
Identity:      i6300ESB timer [version 0]
Timeout:       30 seconds
Pre-timeout:    0 seconds
FLAG           DESCRIPTION               STATUS BOOT-STATUS
KEEPALIVEPING  Keep alive ping reply          1           0
MAGICCLOSE     Supports magic close char      0           0
SETTIMEOUT     Set timeout (in seconds)       0           0

# wdctl /dev/watchdog1
Device:        /dev/watchdog1
Identity:      Software Watchdog [version 0]
Timeout:       60 seconds
Pre-timeout:    0 seconds
FLAG           DESCRIPTION               STATUS BOOT-STATUS
KEEPALIVEPING  Keep alive ping reply          1           0
MAGICCLOSE     Supports magic close char      1           0
SETTIMEOUT     Set timeout (in seconds)       0           0

Note that as of RHEL 8.1, softdog is not supported for use with SBD.

Testing watchdog devices


Use the `pcs stonith sbd watchdog test` command to test a watchdog device. If this works properly, it should force a reset of the machine.
Usage: pcs stonith sbd watchdog test...
    sbd watchdog test [<watchdog-path>]
        This operation is expected to force-reboot the local system without
        following any shutdown procedures using a watchdog. If no watchdog is
        specified, available watchdog will be used if only one watchdog device
        is available on the local system.

Note that by specifying a <watchdog-path>, you can test any available watchdog. This command can also be run without a <watchdog-path> to use the available watchdog if only one is available.

# pcs stonith sbd watchdog test
Warning: This operation is expected to force-reboot this system without following any shutdown procedures.
Proceed? [no/yes]: yes
System will reset shortly
Error: Multiple watchdog devices available, therefore, watchdog which should be tested has to be specified. To list available watchdog devices use command 'pcs stonith sbd watchdog list'

# pcs stonith sbd watchdog test /dev/watchdog
Warning: This operation is expected to force-reboot this system without following any shutdown procedures.
Proceed? [no/yes]: yes
System will reset shortly

Root Cause

RHEL 8 adds a new pcs stonith sbd watchdog subcommand to list and test available watchdog devices for SBD.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.