SUSE Support

Here When You Need Us

Create a SBD partition for HAE (High Availability) and XML example

This document (7007616) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 SP1
SUSE Linux Enterprise Server 11 

Situation

When selecting a STONITH resource a SBD partition may be desired. The following is a suggestion on how to setup the SBD partition as well as the XML.

Resolution

- How to configure Stonith/SDB resource

Documentation:

[SBD Fencing]
[SLES Stonith]

1- identify which empty device/partition you have shared among your HA nodes (e.g.; /dev/sbd1). Please, make sure that device/partition is NOT in use before proceeding.

2- Then, run the following command to create the sbd info in /dev/sdb1

sbd -d /dev/sdb1 create

3- check if you have the following info in /dev/sdb1

sbd -d /dev/sdb1 dump
Header version     : 2
Number of slots    : 255
Sector size        : 512
Timeout (watchdog) : 5
Timeout (allocate) : 2
Timeout (loop)     : 1
Timeout (msgwait)  : 10

4- Setup the software watchdog add the line to /etc/init.d/boot.local:

modprobe softdog  

NOTE3: this needs to be done on all nodes.

5- Start the sbd daemon add the following to /etc/sysconfig/sbd:

Note: You may need to create the sbd file.

SBD_DEVICE="/dev/sdb1"
SBD_OPTS="-W"

NOTE4: you need to change the device name for the one you are going to use there. In the case where multipath is being used in conjunction with SBD you can point it to your /dev/mapper/ device or /dev/disk/by-id/.

Now scp the sbd file to all nodes and make sure you put that sbd file under /etc/sysconfig directory.

scp /etc/sysconfig/sbd root@host:/etc/sysconfig/sbd

6- Test the sbd daemon

sbd -d /dev/sdb1 list

The above list command will dump the node slots, and their current messages, from the sbd device. You should see all cluster nodes being listed there; most likely with a message clear.

7- You can now try sending a test message to one of the nodes:

sbd -d /dev/sdb1 message nodea test

The node will acknowledge the receipt of the message in the system logs:

Aug 29 14:10:00 nodea sbd: [13412]: info: Received command test from nodeb

8- Configure the fencing resource Add a STONITH resource of type external/sbd to the CIB, setting the sbd_device instance attribute accordingly.

I created a SBD primitive resource following SUSE's online documentation found here:
 
https://documentation.suse.com/sle-ha/
 
That's it. You can test it stopping the network service (e.g.; rcnetwork stop) on one node and waiting for the SBD stonith resource to restart it.

More details about SBD stonith device at https://wiki.clusterlabs.org/wiki/Using_SBD_with_Pacemaker

Additional Information

SLES 11 SP1 High Availability Extension STONITH documentation
https://documentation.suse.com/sle-ha/
 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7007616
  • Creation Date: 20-Jan-2011
  • Modified Date:28-Sep-2022
    • SUSE Linux Enterprise High Availability Extension
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Real Time Extension

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.