On Nov 30, 2007, at 5:59 PM, Remigiusz Stachura wrote:

Hi,
I have created a simple two-node cluster with 2 multi-state drbd
resources on each node. I use DRBD 7.x and the most fresh HA 2.1.2-24
working on SLES10 SP1.
The only rules for my cluster I need are:
- resources must be promoted to master state on the same node (IT WORKS).
- if one of the drbd resources fail on the primary node:

if you get the cluster into this state again and attach the result of "cibadmin -Q" I should be able to help


        - the rest of drbd resources on the primary mode must be demoted and
- on the secondary node all drbd resources schould be promoted to master.

I have tried many rsc_colocation rules but without succes.
How to get such result?

The second question is:
If I want node to reboot when a drbd resource stop fails should I have
stonith resource (external/ssh)?

it would be preferable to have a real stonith device, but if thats not an option external/ssh will also work for this purpose


Or should be enough this operation <op id="dummy-resource-stop-id"
name="stop" on_fail="fence"/> for drbd resource?

that is the default (when stonith is enabled)



Below is my cib.xml. Thanks for advance.

<cib generated="true" admin_epoch="0" have_quorum="true"
ignore_dtd="false" num_peers="2" ccm_transition="2"
cib_feature_revision="2.0"
dc_uuid="ab32a94f-9db5-4368-b07a-8157452386e5" epoch="30"
num_updates="3" cib-last-written="Fri Nov 30 17:14: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:
b42542bc75cb615fbf1c9674085f8c73f14145ca"/>
          <nvpair
id="cib-bootstrap-options-default-resource-failure-stickiness"
name="default-resource-failure-stickiness" value="0"/>
          <nvpair name="last-lrm-refresh"
id="cib-bootstrap-options-last-lrm-refresh" value="1196439151"/>
        </attributes>
      </cluster_property_set>
    </crm_config>
    <nodes>
      <node id="aeb7f827-aa1e-47e1-80c1-3dc1bdd35958" uname="sles236"
type="normal"/>
      <node id="ab32a94f-9db5-4368-b07a-8157452386e5" uname="sles238"
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="started"/>
          </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="tr2"/>
            </attributes>
          </instance_attributes>
          <operations>
<op id="drbd0_mon_0" name="monitor" interval="12s" timeout="5s"/>
            <op id="drbd0_mon_2" name="monitor" interval="10s"
timeout="5s" role="Master"/>
          </operations>
        </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_2" name="monitor" interval="10s"
timeout="5s" role="Master"/>
          </operations>
        </primitive>
      </master_slave>
    </resources>
    <constraints>
      <rsc_location id="pref_location_drbd0" rsc="ms-drbd0">
        <rule id="sles236_location_drbd0" score="100"
boolean_op="and" role="Master">
          <expression attribute="#uname" id="drbd0_on_sles236"
operation="eq" value="sles236"/>
        </rule>
      </rsc_location>
      <rsc_location id="pref_location_drbd1" rsc="ms-drbd1">
        <rule id="sles236_location_drbd1" score="100"
boolean_op="and" role="Master">
          <expression attribute="#uname" id="drbd1_on_sles236"
operation="eq" value="sles236"/>
        </rule>
      </rsc_location>
    </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

_______________________________________________
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