[DRBD-user] How to colocate multiple DRBD resources in HB2?

Kai Stian Olstad kai.stian.olstad at gmail.com
Mon Feb 23 10:50:30 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi,

I'm setting up a file server cluster with SLES 10, DRBD 8.2.7, LVM2,
Samba 3.2.8 and Heartbeat 2.1.4.
The DRBD resources is master/slave (ocf/heartbeat).

In this configuration it will be multiple DRBD resources that are
added to the same volume group in LVM.
To make this work i'll have to get all the DRBD masters to run on the
same node, but I have problem in doing so.

The DRBD resource is configuration:
<master_slave id="drbd-felles1">
  <meta_attributes id="drbd-felles1_meta_attrs">
    <attributes>
      <nvpair id="drbd-felles1_metaattr_target_role"
name="target_role" value="started"/>
      <nvpair id="drbd-felles1_metaattr_clone_max" name="clone_max"
value="2"/>
      <nvpair id="drbd-felles1_metaattr_clone_node_max"
name="clone_node_max" value="1"/>
      <nvpair id="drbd-felles1_metaattr_master_max" name="master_max"
value="1"/>
      <nvpair id="drbd-felles1_metaattr_master_node_max"
name="master_node_max" value="1"/>
      <nvpair id="drbd-felles1_metaattr_notify" name="notify"
value="true"/>
      <nvpair id="drbd-felles1_metaattr_globally_unique"
name="globally_unique" value="false"/>
    </attributes>
  </meta_attributes>
  <primitive id="res-drbd-felles1" class="ocf" type="drbd"
provider="heartbeat">
    <instance_attributes id="res-drbd-felles1_instance_attrs">
      <attributes>
        <nvpair id="4a811802-ce58-4b53-8022-412672411c77"
name="drbd_resource" value="felles1"/>
      </attributes>
    </instance_attributes>
  </primitive>
</master_slave>

I also have one more that is called felles2 instead of felles1.

To make the master be on the same node I have tried this colocation rule:
<rsc_colocation id="drbd-felles2_on_drbd-felles1" to="drbd-felles1"
to_role="master" from="drbd-felles2" score="infinity"/>

What happens is that drbd-felles1 is running master(primary) on node1
and slave(secondary) on the other node2.
When I start the drbd-felles2 it will run master on node1 but doesn't
start at all on node2.

If I remove colocation rule or lover the score the drbd-felles2 slave
will start on node2, but then I'm not guarantied that the masters will
run on the same node.

Does anyone have a solution or suggestion to this problem?

-- 
Kai Stian Olstad



More information about the drbd-user mailing list