Hi,
I have a two-node cluster that has more then 2 multi-state drbd
resources on each node. All these resources must be promoted
to master state on the same node because they creates a filesystem for
Xen DomU. Xen will never migrate so I use DRBD 7.x and the most fresh
HA 2.1.2-15 working on SLES10 SP1.
I have created configuration included as a cib2.xml which mainly do what I want.
(for testing only there are 2 drbd resources and IPaddr resource - not
Xen resource)
My problem is I wasn't able to create rule which make:
-if one of the drbd resources fail on the primary node, all of them
should be on the secondary node promoted to master before starting
there Xen.
How can I create such rules?
Could you give same examples?
thanks in advance
<cib generated="true" admin_epoch="0" have_quorum="true" ignore_dtd="false" num_peers="2" cib_feature_revision="2.0" ccm_transition="2" dc_uuid="a7173060-86a8-4f89-b8ea-2f724d7835c5" epoch="243" num_updates="1" cib-last-written="Mon Oct 29 15:04:15 2007">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.2-node: 394e7c3241c59ee0e538643fde4b60cddaf5d3f4"/>
<nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1193652755"/>
<nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="INFINITY"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node uname="sles236" type="normal" id="48bec8a9-cfe4-49df-8818-abb42224ea99">
<instance_attributes id="nodes-48bec8a9-cfe4-49df-8818-abb42224ea99">
<attributes>
<nvpair name="standby" id="standby-48bec8a9-cfe4-49df-8818-abb42224ea99" value="off"/>
</attributes>
</instance_attributes>
</node>
<node uname="sles238" type="normal" id="a7173060-86a8-4f89-b8ea-2f724d7835c5">
<instance_attributes id="nodes-a7173060-86a8-4f89-b8ea-2f724d7835c5">
<attributes>
<nvpair name="standby" id="standby-a7173060-86a8-4f89-b8ea-2f724d7835c5" value="off"/>
</attributes>
</instance_attributes>
</node>
</nodes>
<resources>
<master_slave id="ms-drbd0">
<meta_attributes id="ma-ms-drbd0">
<attributes>
<nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>
<nvpair id="ma-ms-drbd0-2" name="clone_node_max" value="1"/>
<nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>
<nvpair id="ma-ms-drbd0-4" name="master_node_max" value="1"/>
<nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>
<nvpair id="ma-ms-drbd0-6" name="globally_unique" value="false"/>
<nvpair id="ma-ms-drbd0-7" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<primitive class="ocf" provider="heartbeat" type="drbd" id="drbd0">
<instance_attributes id="ia-drbd0">
<attributes>
<nvpair id="ia-drbd0-1" name="drbd_resource" value="tr2"/>
</attributes>
</instance_attributes>
<operations>
<op id="drbd0_mon_0" name="monitor" interval="12s" timeout="5s"/>
<op id="drbd0_mon_1" name="monitor" interval="10s" timeout="5s" role="Master"/>
</operations>
<meta_attributes id="drbd0:0_meta_attrs">
<attributes>
<nvpair name="target_role" id="drbd0:0_metaattr_target_role" value="started"/>
</attributes>
</meta_attributes>
</primitive>
</master_slave>
<master_slave id="ms-drbd1">
<meta_attributes id="ma-ms-drbd1">
<attributes>
<nvpair id="ma-ms-drbd1-1" name="clone_max" value="2"/>
<nvpair id="ma-ms-drbd1-2" name="clone_node_max" value="1"/>
<nvpair id="ma-ms-drbd1-3" name="master_max" value="1"/>
<nvpair id="ma-ms-drbd1-4" name="master_node_max" value="1"/>
<nvpair id="ma-ms-drbd1-5" name="notify" value="yes"/>
<nvpair id="ma-ms-drbd1-6" name="globally_unique" value="false"/>
<nvpair id="ma-ms-drbd1-7" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<primitive id="drbd1" class="ocf" provider="heartbeat" type="drbd">
<instance_attributes id="ia-drbd1">
<attributes>
<nvpair id="ia-drbd1-1" name="drbd_resource" value="tr2-var"/>
</attributes>
</instance_attributes>
<operations>
<op id="drbd1_mon_0" name="monitor" interval="12s" timeout="5s"/>
<op id="drbd1_mon_1" name="monitor" interval="10s" timeout="5s" role="Master"/>
</operations>
<meta_attributes id="drbd1:0_meta_attrs">
<attributes>
<nvpair id="drbd1:0_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
</primitive>
</master_slave>
<primitive id="IPaddr" class="ocf" type="IPaddr" provider="heartbeat">
<meta_attributes id="IPaddr_meta_attrs">
<attributes>
<nvpair id="IPaddr_metaattr_target_role" name="target_role" value="started"/>
</attributes>
</meta_attributes>
<instance_attributes id="IPaddr_instance_attrs">
<attributes>
<nvpair id="dc2f3bcf-1536-4915-8530-e98c24a21f1a" name="ip" value="10.150.75.239"/>
<nvpair id="4ba347b0-7111-4e49-b84f-84e395a68658" name="nic" value="eth0"/>
</attributes>
</instance_attributes>
<operations>
<op id="c886cbcd-4d0b-40bf-bbb7-35be65ab19a4" name="monitor" interval="5s" timeout="20s" start_delay="1s"/>
</operations>
</primitive>
</resources>
<constraints>
<rsc_order id="drbd0_before_IP" from="IPaddr" action="start" to="ms-drbd0" to_action="promote"/>
<rsc_order id="drbd1_before_IP" from="IPaddr" action="start" to="ms-drbd1" to_action="promote"/>
<rsc_location id="drbd0_sles236" rsc="ms-drbd0">
<rule id="prefered_drbd0_sles236" score="100">
<expression attribute="#uname" id="801dde96-09af-4dd0-ab74-a718683bb336" operation="eq" value="sles236"/>
</rule>
</rsc_location>
<rsc_location id="drbd1_sles236" rsc="ms-drbd1">
<rule id="prefered_drbd1_sles236" score="0"/>
</rsc_location>
<rsc_colocation id="IPaddr_drbd0" from="IPaddr" to="ms-drbd0" to_role="master" score="INFINITY"/>
<rsc_colocation id="IPaddr_drbd1" from="IPaddr" to="ms-drbd1" to_role="master" score="INFINITY"/>
</constraints>
</configuration>
</cib>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems