[Linux-HA] colocation of drbd resources in master state

Remigiusz Stachura remigiusz.stachura at gmail.com
Thu Nov 22 09:02:07 MST 2007


Hi,
I have created a simple two-node cluster with 2 multi-state drbd
resources on each node. All these resources must be promoted
to master state on the same node because they are  filesystem for
Xen DomU. There is no necessery live  migration so I use DRBD 7.x and
the most fresh HA 2.1.2-21 working on SLES10 SP1.

My problem still is to have the rule which make:

-if one of the drbd resources fail on the primary node,
on the secondary node all drbd resources schould be promoted to master.

I have created rsc_colocation:
<rsc_colocation id="drbd0_drbd1_master" to="ms-drbd1" to_role="master"
from="ms-drbd0" from_role="master" score="INFINITY/>

After putting it to cib.xml I get stange effect - one of the resources
on secondary node stop running:
- node1: ms-drbd0 - master, ms-drbd1 - master
- node2: ms-drbd0 - not running, ms-drbd1 - slave.
After removing the colocation everything works like before.
I'am puting result of: cibadmin -Ql to the file cib2_check.xml

The second problem:
I have created location constraint which should prefer one node for
promoted drbd resource. Is it valid rsc_location constraint?

<rsc_location id="location_drbd0" rsc="ms-drbd0">
    <rule id="prefered_location_drbd0" score="100" boolean_op="and" >
	<expression attribute="#uname" id="drbd0_on_sles225" operation="eq"
value="sles225"/>
	<expression attribute="#role" id="drbd0_in_role__master"
operation="eq" value="Master"/>
    </rule>
</rsc_location>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cib2_check.xml
Type: text/xml
Size: 20307 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha/attachments/20071122/84a907a9/cib2_check-0001.bin


More information about the Linux-HA mailing list