<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>Jake,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">This seems to work as I wanted when I broke the order line up into:</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><span class="Apple-tab-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; white-space: pre; ">        </span>colocation coloc-ip-and-fs-and-drbd inf: glance-ip-p glance-fs-p ms-glance-drbd:Master</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>order order-glance-drbd-master-before-fs inf:
 ms-glance-drbd:promote glance-fs-p:start</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>order order-glance-fs-before-ip inf: glance-fs-p:start glance-ip-p:start</div><div><br></div><div>I need to run more tests to make sure.</div><div><br></div><div>It would be helpful to get the definition of an IPMI STONITH configuration which works. &nbsp; When I was trying it I was getting nodes shooting each other at join even though they should see each other. &nbsp;:(</div><div><br></div><div><br>Thanks,</div><div><br></div><div>Bob</div>&nbsp;<div><br><div><br></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Bob Schatz &lt;bschatz@yahoo.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Jake Smith
 &lt;jsmith@argotec.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> "drbd-user@lists.linbit.com" &lt;drbd-user@lists.linbit.com&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 16, 2011 3:35 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [DRBD-user] Fw: DRBD STONITH - how is Pacemaker constraint cleared?<br></font><br><div id="yiv677137629"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: times, serif; "><span>Jake,</span></div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>Answers to questions:</span></div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(Q)
 &nbsp;What versions?</span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(A) &nbsp;Ubuntu 10.04.2 LTS, &nbsp;Pacemaker 1.0.8, &nbsp;DRBD&nbsp;8.3.7 and LVM&nbsp;2.02.54 using Corosync</span></div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; ">(Q) &nbsp;Why have LVM in configuration?</div><div style="font-size: 12pt; font-family: times, serif; "><span>(A) I removed LVM from the configuration as well as the group.</span></div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(Q) What dependency do you want?</span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(A) &nbsp;IP should start after the file system is up and the file system should only mount after DRBD is MASTER. &nbsp; (I plan on adding MySQL on top of the IP address after
 this)</span></div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(Q)&nbsp;</span>(curiosity) why 59/61 for intervals?</div><div style="font-size: 12pt; font-family: times, serif; ">(A) I knew that I had to pick different intervals for the monitors and just picked them off the top of my head. &nbsp; What are you using?</div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; ">(Q) STONITH lists both hostnames, why?</div><div style="font-size: 12pt; font-family: times, serif; ">(A) I removed STONITH for now to aid in my debugging. &nbsp; I listed both names since the STONITH seemed to fail. &nbsp; It appears that the STONITH would not start on the local node because
 the plugin removed the local host name from the list. &nbsp; How did you specify your STONITH devices? &nbsp; Can you give me the exact configuration?</div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(Q) You specified the grouping of resources incorrectly in the configuration file.</span></div><div style="font-size: 12pt; font-family: times, serif; "><span>(A) Thanks. &nbsp; I changed the configuration to no longer use groups and to just use "order" and "colocation". &nbsp; However, I still see the IP address starting BEFORE the files system completes START (mount). &nbsp;I have tried playing with the order directive but it does not seem to matter.</span></div><div style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div style="font-size: 12pt; font-family: times, serif; "><span>Here is my updated configuration:</span></div><div
 style="font-size: 12pt; font-family: times, serif; "><span><br></span></div><div><span><div>&nbsp; &nbsp; &nbsp; &nbsp; node cnode-1-3-5</div><div>&nbsp; &nbsp; &nbsp; &nbsp; node cnode-1-3-6</div><div>&nbsp; &nbsp; &nbsp; &nbsp; primitive glance-drbd-p ocf:linbit:drbd \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params drbd_resource="glance-repos-drbd" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op start interval="0" timeout="240" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op stop interval="0" timeout="100" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op monitor interval="59s" role="Master" timeout="30s" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; op monitor interval="61s" role="Slave" timeout="30s"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; primitive glance-fs-p ocf:heartbeat:Filesystem \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params device="/dev/drbd1" directory="/glance-mount" fstype="ext4" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op start interval="0" timeout="60" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op monitor interval="60" timeout="60" OCF_CHECK_LEVEL="20" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op stop interval="0" timeout="120"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; primitive glance-ip-p ocf:heartbeat:IPaddr2 \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params ip="10.4.0.25" nic="br100" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op monitor interval="5s"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ms ms-glance-drbd glance-drbd-p
 \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; meta master-node-max="1" clone-max="2" clone-node-max="1" globally-unique="false" notify="true" target-role="Started"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; location drbd-fence-by-handler-ms-glance-drbd ms-glance-drbd \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rule $id="drbd-fence-by-handler-rule-ms-glance-drbd" $role="Master" -inf: #uname ne cnode-1-3-5</div><div>&nbsp; &nbsp; &nbsp; &nbsp; colocation coloc-ip-and-fs-and-drbd inf: glance-ip-p glance-fs-p ms-glance-drbd:Master &nbsp; &nbsp; &nbsp; &nbsp;order order-glance-drbd-master-before-fs-before-ip inf: ms-glance-drbd:promote glance-fs-p:start glance-ip-p:start&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; property $id="cib-bootstrap-options" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; cluster-infrastructure="openais" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; expected-quorum-votes="2" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stonith-enabled="false" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; no-quorum-policy="ignore" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; last-lrm-refresh="1313440611"</div><div>&nbsp; &nbsp; &nbsp; &nbsp; rsc_defaults $id="rsc-options" \</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resource-stickiness="100"</div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; ">Thanks again,</div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; ">Bob</div><div
 style="font-size: 12pt; font-family: times, serif; "><br></div></span></div><div style="font-size: 12pt; font-family: times, serif; "><br></div><div style="font-size: 12pt; font-family: times, serif; "><div style="font-size: 12pt; font-family: times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Jake Smith &lt;jsmith@argotec.com&gt;<br><b><span style="font-weight:bold;">To:</span></b> Bob Schatz &lt;bschatz@yahoo.com&gt;<br><b><span style="font-weight:bold;">Cc:</span></b> drbd-user@lists.linbit.com<br><b><span style="font-weight:bold;">Sent:</span></b> Tuesday, August 16, 2011 8:31 AM<br><b><span style="
font-weight:bold;">Subject:</span></b> Re: [DRBD-user] Fw: DRBD STONITH - how is Pacemaker constraint cleared?<br></font><br>Bob - np that's what we're all out here for.<br><br>A few baseline questions I missed earlier:<br><br>- What OS?<br>- What versions of DRBD/Pacmaker/LVM2?<br>- Not that it should matter but Heartbeat or Corosync?<br><br>I'm thinking that the LVM stuff is unnecessary so I put some notes in your config below to remove it.&nbsp; Also I what is missing to get the startup order working is there too.&nbsp; Let me know if you have more questions and how you make out.<br><br>Jake<br><br>----- Original Message ----- <br><br>&gt; From: "Bob Schatz" &lt;<a rel="nofollow" ymailto="mailto:bschatz@yahoo.com" target="_blank" href="mailto:bschatz@yahoo.com">bschatz@yahoo.com</a>&gt;<br>&gt; To: "Jake Smith" &lt;<a rel="nofollow" ymailto="mailto:jsmith@argotec.com" target="_blank" href="mailto:jsmith@argotec.com">jsmith@argotec.com</a>&gt;<br>&gt;
 Cc: <a rel="nofollow" ymailto="mailto:drbd-user@lists.linbit.com" target="_blank" href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br>&gt; Sent: Monday, August 15, 2011 6:25:22 PM<br>&gt; Subject: Re: [DRBD-user] Fw: DRBD STONITH - how is Pacemaker<br>&gt; constraint cleared?<br><br>&gt; Jake,<br><br>&gt; Thanks for your help!<br><br>&gt; Answers to questions:<br><br>&gt; 1. (Q) Why do you have LVM defined in the configuration?<br>&gt; (A) I wanted to make sure the LVM volumes were started before I start<br>&gt; DRBD (I have DRBD configured on top of LVM). I assume that this<br>&gt; should be okay.<br><br>My config is also DRBD on top of LVM however I don't "start" LVM... I believe it starts on boot.&nbsp; I don't have anything in my Pacemaker config for LVM; I just start with the DRBD primitive and build out from there.<br>I believe the purpose of the LVM resource agent is for LVM on top of DRBD not the other way
 around...<br><br>&gt; 2. (Q) Can you clarify what you mean by "DRBD is not started"?<br>&gt; (A)
 If I do a "cat /proc/drbd", I see "unconfigured". The DRBD agent<br>&gt; START routine is never called. I believe this problem will be fixed<br>&gt; once I work through my other problems.<br><br>Got it<br><br>&gt; 3. (Q) Colocation appears to be backwards per the documentation.<br>&gt; (A) Thanks! I changed it per your suggestion. However, the Filesystem<br>&gt; agent START routine is now called before the DRBD resources enters<br>&gt; the MASTER state.<br><br>There is no order constraint between FS and DRBD - see below in config<br><br>&gt; I made the changes you suggested. (I assumed I should not have to<br>&gt; specify the stopping/demoting sequences but it was the only way I<br>&gt; could get it to work.)<br><br>&gt; After these changes, a timeline of the behavior I see is this<br>&gt; sequence logged by agent entry point calls:<br><br>&gt; 1. Call LVM start and before LVM start finishes<br>&gt; 2. Call Filesystem start<br><br>At this time I expect
 the IP is up? According to your grouping that would trigger FS start.<br><br>&gt; This fails since DRBD volume is readonly<br><br>&gt; 3. LVM start completes<br>&gt; 4. Filesystem stop (called because Filesystem start fails)<br>&gt; 5. DRBD start called<br>&gt; 6. DRBD promote called<br><br>&gt; My expectation was that the Filesystem start routine would not be<br>&gt; called until DRBD was MASTER.<br><br>&gt; My configuration is:<br><br>&gt; node cnode-1-3-5<br>&gt; node cnode-1-3-6<br>&gt; primitive glance-drbd-p ocf:linbit:drbd \<br>&gt; params drbd_resource="glance-repos-drbd" \<br>&gt; op start interval="0" timeout="240" \<br>&gt; op stop interval="0" timeout="100" \<br>&gt; op monitor interval="59s" role="Master" timeout="30s" \<br>&gt; op monitor interval="61s" role="Slave" timeout="30s"<br><br>(curiosity) why 59/61 for intervals?<br><br>&gt; primitive glance-fs-p ocf:heartbeat:Filesystem \<br>&gt; params device="/dev/drbd1"
 directory="/glance-mount" fstype="ext4" \<br>&gt; op start interval="0" timeout="60" \<br>&gt; op monitor interval="60" timeout="60" OCF_CHECK_LEVEL="20" \<br>&gt; op stop interval="0" timeout="120"<br>&gt; primitive glance-ip-p ocf:heartbeat:IPaddr2 \<br>&gt; params ip="10.4.0.25" nic="br100" \<br>&gt; op monitor interval="5s"<br>&gt; primitive glance-lvm-p ocf:heartbeat:LVM \<br>&gt; params volgrpname="glance-repos" exclusive="true" \<br>&gt; op start interval="0" timeout="30" \<br>&gt; op stop interval="0" timeout="30"<br><br>Remove the primitive for LVM.<br><br>&gt; primitive node-stonith-5-p stonith:external/ipmi \<br>&gt; op monitor interval="10m" timeout="1m" target_role="Started" \<br>&gt; params hostname="cnode-1-3-5 cnode-1-3-6" ipaddr="172.23.8.99"<br>&gt; userid="ADMIN" passwd="foo" interface="lan"<br><br>Did you mean to have both node names in the hostname param? Not relevant to the problem...<br><br>&gt; primitive node-stonith-6-p
 stonith:external/ipmi \<br>&gt; op monitor interval="10m" timeout="1m" target_role="Started" \<br>&gt; params hostname="cnode-1-3-5 cnode-1-3-6" ipaddr="172.23.8.100"<br>&gt; userid="ADMIN" passwd="foo" interface="lan"<br>&gt; group group-glance-fs glance-fs-p glance-ip-p \<br>&gt; meta target-role="Started"<br><br>This group is saying that the glance-fs has to start after the glance-ip and on the same node as the glance-ip... as soon as the IP is started then you're fs will try to start irregardless of the state of your DRBD resource.&nbsp; You probably know already but group my_group_resx_resy resx resy is basically saying resx must colocate with and order start after resy. What does the IP have to do with the FS? Without knowing I would expect the IP to start after the FS is ready making this one backward...<br>And lastly you can't have it this way (FS starts after IP in a group) and set FS to start on DRBD master below.&nbsp; If you make IP rely on
 FS then it's OK.&nbsp; If you want it this way then you need to remove the group and do a colo and order like this:<br><br>order order-glance-drbd-master-before-ip-before-fs inf: ms-glance-drbd:promote glance-ip-p:start glance-fs-p:start<br>colocation coloc-fs-and-ip-and-drbd inf: glance-fs-p glance-ip-p ms-glance-drbd:Master<br><br>Did I confuse you yet? ;-)<br><br><br>&gt; ms ms-glance-drbd glance-drbd-p \<br>&gt; meta master-node-max="1" clone-max="2" clone-node-max="1"<br>&gt; globally-unique="false" notify="true" target-role="Master"<br>&gt; clone cloneLvm glance-lvm-p<br><br>Remove this clone<br><br>&gt; location loc-node-stonith-5 node-stonith-5-p \<br>&gt; rule $id="loc-node-stonith-5-rule" -inf: #uname eq cnode-1-3-5<br>&gt; location loc-node-stonith-6 node-stonith-6-p \<br>&gt; rule $id="loc-node-stonith-6-rule" -inf: #uname eq cnode-1-3-6<br>&gt; colocation coloc-fs-group-and-drbd inf: group-glance-fs<br>&gt; ms-glance-drbd:Master<br><br>Need
 an order contraint to match with this colo to make sure DRBD is promoted before FS starts like:<br>order order-glance-drbd-master-before-fs inf: ms-glance-drbd:promote group-glance-fs:start<br><br>&gt; order order-glance-lvm-before-drbd inf: cloneLvm:start<br>&gt; ms-glance-drbd:start<br><br>Remove this order<br><br>&gt; property $id="cib-bootstrap-options" \<br>&gt; dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \<br>&gt; cluster-infrastructure="openais" \<br>&gt; expected-quorum-votes="2" \<br>&gt; stonith-enabled="true" \<br>&gt; no-quorum-policy="ignore" \<br>&gt; last-lrm-refresh="1313440611"<br>&gt; rsc_defaults $id="rsc-options" \<br>&gt; resource-stickiness="100"<br><br>*snip*<br><br><br><br></div></div></div></div><br>_______________________________________________<br>drbd-user mailing list<br><a ymailto="mailto:drbd-user@lists.linbit.com" href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br><a
 href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br><br><br></div></div></div></div></body></html>