Use only one sbd_device instanace attribute for SBD partitions

  • 7010925
  • 12-Oct-2012
  • 12-Oct-2012

Environment

SUSE Linux Enterprise High Availability Extension 11 (HAE)
Split Brain Detection (SBD) Partitions

Situation

There are multiple sbd_device instance attributes defined for the cluster SBD partitions.

# cibadmin -Q
--snip--
<resources>
 <primitive class="stonith" id="stonith-sbd" type="external/sbd">
   <instance_attributes id="stonith-sbd-instance_attributes">
     <nvpair id="stonith-sbd-instance_attributes-sbd_device" name="sbd_device" value="/dev/sdb1"/>
     <nvpair id="stonith-sbd-instance_attributes-sbd_device-0" name="sbd_device" value="/dev/sdc1"/>
     <nvpair id="stonith-sbd-instance_attributes-sbd_device-1" name="sbd_device" value="/dev/sdc2"/>
   </instance_attributes>
   <meta_attributes id="stonith-sbd-meta_attributes">
     <nvpair id="stonith-sbd-meta_attributes-target-role" name="target-role" value="Started"/>
   </meta_attributes>
 </primitive>
</resources>
--snip--

The /etc/sysconfig/sbd configuration file shows three SBD partitions.

# cat /etc/sysconfig/sbd
SBD_DEVICE="/dev/sdb1;/dev/sdc1;/dev/sdc2"
SBD_OPTS="-W"

Resolution

Delete all sbd_device instance attributes and create one with the value defined in the /etc/sysconfig/sbd configuration file.

1. Remove the existing SBD resource, where --resource is the id specified in the primitive directive, as from the example above: <primitive class="stonith" id="stonith-sbd" type="external/sbd">
crm_resource --delete --resource stonith-sbd --resource-type primitive

2. Create a new SBD resource with the correct values found in the /etc/sysconfig/sbd configuration file (for this example: SBD_DEVICE="/dev/sdb1;/dev/sdc1;/dev/sdc2").
crm configure primitive stonith_sbd stonith:external/sbd params sbd_device="/dev/sdb1;/dev/sdc1;/dev/sdc2"
-OR-
crm configure primitive stonith_sbd stonith:external/sbd

The second example will cause the cluster to use the values in the /etc/sysconfig/sbd file. The resource should look like something like the following when done.
# cibadmin -Q
--snip--
<primitive class="stonith" id="stonith_sbd" type="external/sbd">
  <instance_attributes id="stonith_sbd-instance_attributes">
    <nvpair id="stonith_sbd-instance_attributes-sbd_device" name="sbd_device" value="/dev/sdb1;/dev/sdc1;/dev/sdc2"/>
  </instance_attributes>
</primitive>
--snip--

Cause

There should only be zero or one sbd_device instance attributes in the CIB database. If it has a value, it should be the same value as the /etc/sysconfig/sdb SBD_DEVICE variable. Behavior is undefined when the values do not match.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.