---8<--- Snip ---8<---
I have attached my res.xml and cons.xml for my resources and constraints
sections respectivley.
I too worked through the online resources from linux-ha.org and other
places including a lot of help from here and #linux-ha on freenode. I am
sure they are not a definative example as every cluster is different,
but they are working OK for me so far and hopefully will help you...
Paul
(aka Gargoyle)
<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 name="target_role" id="ma-ms-drbd0-7" value="stopped"/>
</attributes>
</meta_attributes>
<primitive id="drbd0" class="ocf" provider="heartbeat" type="drbd">
<instance_attributes id="ia-drbd0">
<attributes>
<nvpair id="ia-drbd0-1" name="drbd_resource" value="r0"/>
</attributes>
</instance_attributes>
</primitive>
</master_slave>
<group id="fs_mysql_ip">
<primitive class="ocf" provider="heartbeat" type="Filesystem" id="fs0">
<meta_attributes id="ma-fs0">
<attributes>
<nvpair name="target_role" id="ma-fs0-1" value="#default"/>
</attributes>
</meta_attributes>
<instance_attributes id="ia-fs0">
<attributes>
<nvpair id="ia-fs0-1" name="fstype" value="ext3"/>
<nvpair id="ia-fs0-2" name="directory" value="/drbd"/>
<nvpair id="ia-fs0-3" name="device" value="/dev/drbd0"/>
</attributes>
</instance_attributes>
</primitive>
<primitive id="mysqlid" class="lsb" type="mysql"/>
<primitive id="ip_resource" class="ocf" type="IPaddr2" provider="heartbeat">
<instance_attributes id="549e48ed-687f-4f3d-ac93-8d787c7430be">
<attributes>
<nvpair name="ip" value="192.168.0.215" id="15c97f14-a265-47a5-a82b-a4f6017aac51"/>
<nvpair name="nic" value="eth0" id="f08c07f0-f33e-4cb0-89bf-76881a26d65f"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_order id="drbd0_before_group" from="fs_mysql_ip" action="start" to="ms-drbd0" to_action="promote"/>
<rsc_colocation id="group_on_drbd0" to="ms-drbd0" to_role="master" from="fs_mysql_ip" score="infinity"/>
<rsc_location id="ms-drbd0:connected" rsc="ms-drbd0">
<rule id="ms-drbd0:connected:rule" score_attribute="-INFINITY">
<expression id="ms-drbd0:connected:expr:defined" attribute="pingd" operation="not_defined"/>
</rule>
</rsc_location>
</constraints>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems