On Tue, Mar 4, 2008 at 12:46 PM, Guy <[EMAIL PROTECTED]> wrote: > Hi, > > I've got DRBD8 set up and running with Heartbeat + CRM. I've got two > machines, each with a primary partition on and it's secondary on the > alternate machine. > > [EMAIL PROTECTED]:/var/lib/heartbeat/crm# cat /proc/drbd > version: 8.0.3 (api:86/proto:86) > SVN Revision: 2881 build by [EMAIL PROTECTED], 2008-02-15 16:47:42 > 0: cs:SyncSource st:Secondary/Primary ds:UpToDate/Inconsistent C r--- > ns:4129864 nr:0 dw:24 dr:4146365 al:0 bm:326 lo:1 pe:6 ua:256 ap:0 > [====>...............] sync'ed: 22.1% (13438/17229)M > finish: 0:14:53 speed: 15,376 (10,132) K/sec > resync: used:1/31 hits:258370 misses:259 starving:0 dirty:0 > changed:259 > act_log: used:0/257 hits:6 misses:0 starving:0 dirty:0 changed:0 > 1: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r--- > ns:1007640 nr:0 dw:24 dr:1007645 al:0 bm:482 lo:0 pe:0 ua:0 ap:0 > resync: used:0/31 hits:62735 misses:241 starving:0 dirty:0 changed:241 > act_log: used:0/257 hits:6 misses:0 starving:0 dirty:0 changed:0 > > [cib.xml start] > <cib admin_epoch="0" epoch="3" have_quorum="true" ignore_dtd="false" > num_peers="2" cib_feature_revision="1.3" generated="true" > num_updates="1" cib-last-written="Tue Mar 4 11:29:05 2008" > ccm_transition="2" 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="0"/> > <nvpair > id="cib-bootstrap-options-default-resource-failure-stickiness" > name="default-resource-failure-stickiness" value="0"/> > <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> > <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"> > <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"> > <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="500"> > <expression attribute="#uname" operation="eq" value="drbd1" > id="4e72c134-8f56-49bd-b3af-b3fde396d83b"/> > </rule> > </rsc_location> > <rsc_location id="loc:r1_likes_drbd2" rsc="ms-drbd1"> > <rule id="rule:r1_likes_drbd2" role="master" score="500"> > <expression attribute="#uname" operation="eq" value="drbd2" > id="5b8cc51c-00cc-4aee-b3a7-3c5598ffa41c"/> > </rule> > </rsc_location> > <rsc_colocation id="group_1_on_r0_stopped" to="ms-drbd0" > to_role="stopped" from="group_1" score="-infinity"/> > <rsc_colocation id="group_1_on_r0_slave" to="ms-drbd0" > to_role="slave" from="group_1" score="-infinity"/> > <rsc_order id="r0_before_group_1" from="group_1" action="start" > to="ms-drbd0" to_action="promote"/> > <rsc_colocation id="group_11_on_r0_stopped" to="ms-drbd1" > to_role="stopped" from="group_11" score="-infinity"/> > <rsc_colocation id="group_11_on_r0_slave" to="ms-drbd1" > to_role="slave" from="group_11" score="-infinity"/> > <rsc_order id="r1_before_group_11" from="group_11" > action="start" to="ms-drbd1" to_action="promote"/> > </constraints> > </configuration> > </cib> > [cib.xml end] > > I keep running into problems with the shared IP's not coming back > properly and primary partitions not reverting back when a downed > machine comes back up. > The constraints I got from the linux-ha site but they don't quite do > what I want. I suspect that my scores on the rules and > default-resource-stickiness are the first problem. Is there some good > documentation on how the scoring works?
Mostly its scattered through the mailing lists. There is also some in http://www.clusterlabs.org/mw/Image:Colocation_Explained_-_White.pdf and http://www.clusterlabs.org/mw/Image:Configuration_Explained.pdf > If it's on the linux-ha site > I've missed it. > Is there also some way to get heartbeat to do things on the fly? I've > looked at crm_resource but doesn't that just change the cib.xml file > instead of actually instigating the changes? Thats how you get the cluster to do something - you change the cib. _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
