Hi,

On Mon, Feb 25, 2008 at 01:23:31PM +0000, Guy wrote:
> Hi,
> 
> I've got a set up with two machines each running two partitions with
> drbd. Each machine is supposed to be the default primary for one of
> the partitions. I had this all working fine using heartbeat without
> CRM. With CRM however I've gotten it to the point where it loads drbd,
> but puts both primaries on one machine. It then also does not mount
> the partitions and start nfs even though the primaries have been
> loaded.
> 
> Below is my cib.xml file, this was mostly generated from the existing
> haresources file using the haresources conversion script included with
> heartbeat.
> 
> I've also tried it with the following constraints added in before the
> location cronstraints.
>        <rsc_order id="drbd0_before_group_1" from="group_1"
> action="start" to="ms-drbd0" to_action="promote"/>
>        <rsc_colocation id="group_1_on_drbd0" to="ms-drbd0"
> to_role="master" from="group_1" score="infinity"/>
>        <rsc_order id="drbd1_before_group_11" from="group_11"
> action="start" to="ms-drbd1" to_action="promote"/>
>        <rsc_colocation id="group_11_on_drbd1" to="ms-drbd1"
> to_role="master" from="group_11" score="infinity"/>
> 
> [cib.xml start]
>  <cib admin_epoch="0" epoch="1" num_updates="1" generated="false"
> have_quorum="false" ignore_dtd="false" num_peers="0"
> cib-last-written="Mon Feb 25 13:01:15 2008"
> cib_feature_revision="1.3">
>    <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="heartbeat" id="killnfsd_3"
> provider="heartbeat" type="killnfsd">
>            <operations>
>              <op id="killnfsd_3_mon" interval="120s" name="monitor"
> timeout="60s"/>
>            </operations>
>          </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="heartbeat" id="killnfsd_13"
> provider="heartbeat" type="killnfsd">
>            <operations>
>              <op id="killnfsd_13_mon" interval="120s" name="monitor"
> timeout="60s"/>
>            </operations>
>          </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="rsc_location_group_1" rsc="group_1">
>          <rule id="prefered_location_group_1" score="100">
>            <expression attribute="#uname"
> id="prefered_location_group_1_expr" operation="eq" value="drbd1"/>
>          </rule>
>        </rsc_location>
>        <rsc_location id="rsc_location_group_11" rsc="group_11">
>          <rule id="prefered_location_group_11" score="100">
>            <expression attribute="#uname"
> id="prefered_location_group_11_expr" operation="eq" value="drbd2"/>
>          </rule>
>        </rsc_location>
>      </constraints>
>    </configuration>
>  </cib>
> [cib.xml end]
> 
> Anyone have any idea what's wrong with this set up? I've also tried
> this with auto_failback on and off to see what it would do, but since

auto_failback has no effect in v2. Try setting
default-resource-stickiness to INFINITY.

> the location of the primary isn't being done correctly in the first
> place I can only assume I'm doing the constraints incorrectly.
> The constraints are from the generated cib.xml (the location
> constraints) and the order and colocation constraints are from
> http://www.linux-ha.org/DRBD/HowTov2

I don't see the multistate resources specific constraints in the
cib.

Thanks,

Dejan

> Thanks for any help anyone can give.
> Guy
> 
> 
> -- 
> Don't just do something...sit there!
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to