[Linux-HA] colocation of drbd resources in master state
Andrew Beekhof
beekhof at gmail.com
Fri Nov 23 00:54:40 MST 2007
On Nov 22, 2007, at 5:02 PM, Remigiusz Stachura wrote:
> 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
this was fixed in http://hg.beekhof.net/lha/crm-dev/rev/9af5f1170cf4
and will be in the next interim release shortly
> 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>
> <cib2_check.xml>
no, this is what you want instead
<rsc_location id="location_drbd0" rsc="ms-drbd0">
<rule id="prefered_location_drbd0" score="100" boolean_op="and"
role="Master">
<expression attribute="#uname" id="drbd0_on_sles225" operation="eq"
value="sles225"/>
</rule>
</rsc_location>
More information about the Linux-HA
mailing list