[Pacemaker] How to properly define DRBD resources
Michał Margula
alchemyx at uznam.net.pl
Mon Dec 23 11:17:38 UTC 2013
W dniu 21.12.2013 17:23, Никита Староверов pisze:
> Hello. I use drbd 8.4 that has possibility
> of defining drbd minors
> into one resource.
> Properly defined order and colocation rules should also work with drbd 8.3.
>
Hello,
Unfortunately I have 8.3.11. Altough I updated OCF script to have it
identical as in 8.3.16. My another shot was this...
<primitive class="ocf" id="XEN-bilbo" provider="heartbeat" type="Xen">
<instance_attributes id="XEN-bilbo-instance_attributes">
<nvpair id="XEN-bilbo-instance_attributes-xmfile" name="xmfile"
value="/srv/cluster/xen/bilbo.cfg"/>
</instance_attributes>
<operations>
<op id="XEN-bilbo-monitor-240s" interval="240s" name="monitor"
timeout="120s"/>
<op id="XEN-bilbo-stop-0" interval="0" name="stop" timeout="240s"/>
<op id="XEN-bilbo-start-0" interval="0" name="start" timeout="240s"/>
</operations>
<meta_attributes id="XEN-bilbo-meta_attributes">
<nvpair id="XEN-bilbo-meta_attributes-target-role" name="target-role"
value="Started"/>
<nvpair id="XEN-bilbo-meta_attributes-allow-migrate"
name="allow-migrate" value="true"/>
</meta_attributes>
</primitive>
<master id="ms-DRBD-bilbo-root">
<meta_attributes id="ms-DRBD-bilbo-root-meta_attributes">
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-master-max"
name="master-max" value="2"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-master-node-max"
name="master-node-max" value="1"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-clone-max"
name="clone-max" value="2"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-clone-node-max"
name="clone-node-max" value="1"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-notify" name="notify"
value="true"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-target-role"
name="target-role" value="Started"/>
<nvpair id="ms-DRBD-bilbo-root-meta_attributes-is-managed"
name="is-managed" value="true"/>
</meta_attributes>
<primitive class="ocf" id="primitive-DRBD-bilbo-root" provider="linbit"
type="drbd">
<instance_attributes id="primitive-DRBD-bilbo-root-instance_attributes">
<nvpair
id="primitive-DRBD-bilbo-root-instance_attributes-drbd_resource"
name="drbd_resource" value="drbd19-bilbo-root"/>
</instance_attributes>
<operations>
<op id="primitive-DRBD-bilbo-root-monitor-29s" interval="29s"
name="monitor" role="Master"/>
<op id="primitive-DRBD-bilbo-root-monitor-31s" interval="31s"
name="monitor" role="Slave"/>
<op id="primitive-DRBD-bilbo-root-start-0" interval="0"
name="start" timeout="240"/>
<op id="primitive-DRBD-bilbo-root-stop-0" interval="0" name="stop"
timeout="120"/>
</operations>
</primitive>
</master>
<master id="ms-DRBD-bilbo-squid">
<meta_attributes id="ms-DRBD-bilbo-squid-meta_attributes">
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-master-max"
name="master-max" value="2"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-master-node-max"
name="master-node-max" value="1"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-clone-max"
name="clone-max" value="2"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-clone-node-max"
name="clone-node-max" value="1"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-notify" name="notify"
value="true"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-target-role"
name="target-role" value="Started"/>
<nvpair id="ms-DRBD-bilbo-squid-meta_attributes-is-managed"
name="is-managed" value="true"/>
</meta_attributes>
<primitive class="ocf" id="primitive-DRBD-bilbo-squid" provider="linbit"
type="drbd">
<instance_attributes id="primitive-DRBD-bilbo-squid-instance_attributes">
<nvpair
id="primitive-DRBD-bilbo-squid-instance_attributes-drbd_resource"
name="drbd_resource" value="drbd20-bilbo-squid"/>
</instance_attributes>
<operations>
<op id="primitive-DRBD-bilbo-squid-monitor-29s" interval="29s"
name="monitor" role="Master"/>
<op id="primitive-DRBD-bilbo-squid-monitor-31s" interval="31s"
name="monitor" role="Slave"/>
<op id="primitive-DRBD-bilbo-squid-start-0" interval="0"
name="start" timeout="240"/>
<op id="primitive-DRBD-bilbo-squid-stop-0" interval="0" name="stop"
timeout="120"/>
</operations>
</primitive>
</master>
But it was causing trouble, trying to promote one of DRBDs and then
starting XEN. After it failed (because second DRBD was secondary) it
tried to stop both DRBDs and again. Also once it happened that XEN had
still device open and XEN was refusing to stop that VM.
So a mess, stonith, and so on.
Without pacemaker it works perfectly.
--
Michał Margula, alchemyx at uznam.net.pl, http://alchemyx.uznam.net.pl/
"W życiu piękne są tylko chwile" [Ryszard Riedel]
More information about the Pacemaker
mailing list