Hi guys, After much fiddling and learning (still loads to do though) I've got my 2 node primary/secondary & secondary/primary set more or less working. One failure of node 1, node 2 takes both drbd partitions as primary and mounts the partitions and nfs etc etc. When node 1 is brought back up I wait for node 2 to sync back over the old primary on node 1 and then use crm_resource to move the one primary back to node 1. Is there any way to do this automatically? Wait for drbd to sync and then push primary back to node 1? This is just curiosity, doing it manually gives me a chance to see that all is well.
The problem I've really got is if one node just loses connectivity. I've played around with dopd and pingd but this hasn't given the desired results. I have one interface into the network and one connecting the machines by crossover. If node 1 loses connectivity (with dopd running) it fences /dev/drbd0 on node 2, thus stopping node 2 from taking it as primary. What I really need it to do is force any primary partitions into secondary mode if the node loses connectivity so that the "live" node can sync back to it after recovery of connectivity. I don't see that dopd can help me with this, so do I make some sort of constraint with pingd to demote the partitions if there's no connectivity? I have location constraints putting one primary partition on each node, so would I need to do something with the scoring to ensure that demoted partitions stayed that way until resync by drbd was done? I've attached my conf files. As you can see the only constraints I currently have are the location preferences for the primary partitions and the colocation and order constraints to ensure the groups for the fs, nfs and ipaddr only start on the appropriate node. Thanks Guy -- Don't just do something...sit there!
<cib admin_epoch="1" epoch="3" have_quorum="true" ignore_dtd="false" num_peers="2" num_updates="1" cib_feature_revision="1.3" generated="true" cib-last-written="Thu Mar 20 10:33:01 2008" ccm_transition="4" dc_uuid="38f67b9a-1831-49d0-9d93-afb1071f6b8e">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair id="cib-bootstrap-options-symmetric-cluster" name="symmetric-cluster" value="true"/>
<nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="stop"/>
<nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="100"/>
<nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-100"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot"/>
<nvpair id="cib-bootstrap-options-stop-orphan-resources" name="stop-orphan-resources" value="true"/>
<nvpair id="cib-bootstrap-options-stop-orphan-actions" name="stop-orphan-actions" value="true"/>
<nvpair id="cib-bootstrap-options-remove-after-stop" name="remove-after-stop" value="false"/>
<nvpair id="cib-bootstrap-options-short-resource-names" name="short-resource-names" value="true"/>
<nvpair id="cib-bootstrap-options-transition-idle-timeout" name="transition-idle-timeout" value="5min"/>
<nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="15s"/>
<nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" value="true"/>
</attributes>
</cluster_property_set>
</crm_config>
<nodes>
<node id="38f67b9a-1831-49d0-9d93-afb1071f6b8e" uname="drbd2" type="normal"/>
<node id="b776756f-dc29-4b1d-83e7-1980b4aca7e0" uname="drbd1" type="normal"/>
</nodes>
<resources>
<clone id="pingd-clone">
<meta_attributes id="pingd-clone-ma">
<attributes>
<nvpair id="pingd-clone-1" name="globally_unique" value="false"/>
</attributes>
</meta_attributes>
<primitive id="pingd-child" provider="heartbeat" class="ocf" type="pingd">
<operations>
<op id="pingd-child-monitor" name="monitor" interval="20s" timeout="60s" prereq="nothing"/>
<op id="pingd-child-start" name="start" prereq="nothing"/>
</operations>
<instance_attributes id="pingd_inst_attr">
<attributes>
<nvpair id="pingd-1" name="dampen" value="5s"/>
<nvpair id="pingd-2" name="multiplier" value="100"/>
</attributes>
</instance_attributes>
</primitive>
</clone>
<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="#default"/>
</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>
<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="#default"/>
</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="r1"/>
</attributes>
</instance_attributes>
</primitive>
</master_slave>
<group id="group_1">
<meta_attributes id="ma-group_1">
<attributes>
<nvpair id="ma-group_1-ordered" name="ordered" value="true"/>
<nvpair id="ma-group_1-collocated" name="collocated" value="true"/>
</attributes>
</meta_attributes>
<primitive class="ocf" id="Filesystem_2" provider="heartbeat" type="Filesystem">
<operations>
<op id="Filesystem_2_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
<instance_attributes id="Filesystem_2_inst_attr">
<attributes>
<nvpair id="Filesystem_2_attr_0" name="device" value="/dev/drbd0"/>
<nvpair id="Filesystem_2_attr_1" name="directory" value="/h.virt/store1"/>
<nvpair id="Filesystem_2_attr_2" name="fstype" value="ext3"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="lsb" id="nfs-common_4" provider="heartbeat" type="nfs-common">
<operations>
<op id="nfs-common_4_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
</primitive>
<primitive class="lsb" id="nfs-kernel-server_5" provider="heartbeat" type="nfs-kernel-server">
<operations>
<op id="nfs-kernel-server_5_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
</primitive>
<primitive class="ocf" id="IPaddr_10_172_19_120" provider="heartbeat" type="IPaddr">
<operations>
<op id="IPaddr_10_172_19_120_mon" interval="5s" name="monitor" timeout="5s"/>
</operations>
<instance_attributes id="IPaddr_10_172_19_120_inst_attr">
<attributes>
<nvpair id="IPaddr_10_172_19_120_attr_0" name="ip" value="10.172.19.120"/>
<nvpair id="IPaddr_10_172_19_120_attr_1" name="netmask" value="24"/>
<nvpair id="IPaddr_10_172_19_120_attr_2" name="nic" value="eth0"/>
</attributes>
</instance_attributes>
</primitive>
</group>
<group id="group_11">
<meta_attributes id="ma-group_11">
<attributes>
<nvpair id="ma-group_11-ordered" name="ordered" value="true"/>
<nvpair id="ma-group_11-collocated" name="collocated" value="true"/>
</attributes>
</meta_attributes>
<primitive class="ocf" id="Filesystem_12" provider="heartbeat" type="Filesystem">
<operations>
<op id="Filesystem_12_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
<instance_attributes id="Filesystem_12_inst_attr">
<attributes>
<nvpair id="Filesystem_12_attr_0" name="device" value="/dev/drbd1"/>
<nvpair id="Filesystem_12_attr_1" name="directory" value="/h.virt/store2"/>
<nvpair id="Filesystem_12_attr_2" name="fstype" value="ext3"/>
</attributes>
</instance_attributes>
</primitive>
<primitive class="lsb" id="nfs-common_14" provider="heartbeat" type="nfs-common">
<operations>
<op id="nfs-common_14_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
</primitive>
<primitive class="lsb" id="nfs-kernel-server_15" provider="heartbeat" type="nfs-kernel-server">
<operations>
<op id="nfs-kernel-server_15_mon" interval="120s" name="monitor" timeout="60s"/>
</operations>
</primitive>
<primitive class="ocf" id="IPaddr_10_172_19_123" provider="heartbeat" type="IPaddr">
<operations>
<op id="IPaddr_10_172_19_123_mon" interval="5s" name="monitor" timeout="5s"/>
</operations>
<instance_attributes id="IPaddr_10_172_19_123_inst_attr">
<attributes>
<nvpair id="IPaddr_10_172_19_123_attr_0" name="ip" value="10.172.19.123"/>
<nvpair id="IPaddr_10_172_19_123_attr_1" name="netmask" value="24"/>
<nvpair id="IPaddr_10_172_19_123_attr_2" name="nic" value="eth0"/>
</attributes>
</instance_attributes>
</primitive>
</group>
</resources>
<constraints>
<rsc_location id="loc:r0_likes_drbd1" rsc="ms-drbd0">
<rule id="rule:r0_likes_drbd1" role="master" score="50">
<expression attribute="#uname" operation="eq" value="drbd1" id="af32b7d2-8d65-4590-afcd-e00cacc5e9a7"/>
</rule>
</rsc_location>
<rsc_location id="loc:r1_likes_drbd2" rsc="ms-drbd1">
<rule id="rule:r1_likes_drbd2" role="master" score="50">
<expression attribute="#uname" operation="eq" value="drbd2" id="3f9072d0-586c-44e0-8693-30aedf7ef422"/>
</rule>
</rsc_location>
<rsc_order id="r0_before_group_1" from="group_1" action="start" to="ms-drbd0" to_action="promote"/>
<rsc_colocation id="group_1_on_r0" to="ms-drbd0" to_role="master" from="group_1" score="infinity"/>
<rsc_order id="r1_before_group_11" from="group_11" action="start" to="ms-drbd1" to_action="promote"/>
<rsc_colocation id="group_11_on_r1" to="ms-drbd1" to_role="master" from="group_11" score="infinity"/>
</constraints>
</configuration>
</cib>
drbd.conf
Description: Binary data
ha.cf
Description: Binary data
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
