<html><head></head><body>I managed to solve my problem by removing these lines from my drbd config:<br>
<br>
disk {<br>
        on-io-error detach;<br>
        fencing resource-only;<br>
<br>
But all my other working nodes have these lines and there are no problems. It makes me wonder if they are being ignored or if there is a bug or something. <br>
<br>
Anyways, hope this helps somebody. <br>
<br>
Mike<br><br><div class="gmail_quote">On July 14, 2014 5:09:42 PM EDT, Michael Monette &lt;mmonette@2keys.ca&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">I have been having this really odd issue and I can't seem to figure it out. I have tried everything I can think of and I have compared it to all my other working DRBD setups and just cannot get this thing to work. <br /><br />node-1 is primary, /dev/drbd1 is mounted at /opt<br />node-2 is secondary<br />both are UpToDate<br /><br />shut down node-1, try to make node-2 primary and receive the error:<br /><br />1: State change failed: (-7) Refusing to be Primary while peer is not outdated<br />Command 'drbdsetup primary 1' terminated with exit code 11<br /><br />Also check out this one as well:<br /><br />node-1 is primary, /dev/drbd1 is mounted at /opt<br />node-2 is secondary <br />both are UpToDate(same as before)<br /><br />This time, I shut down node-2(secondary). Everything is fine and continues to run normally on node-1. I unmount /dev/drbd1 and put it into secondary, and immediately put it back into primary:<br /><br />umount /dev/drbd1<br />drbdadm
secondary all; drbdadm primary all # I ran these commands in one line so it switches as quick as possible.<br />1: State change failed: (-7) Refusing to be Primary while peer is not outdated<br />Command 'drbdsetup primary 1' terminated with exit code 11<br /><br />iptables is off, SELinux is off. I ran the drbdadm secondary and drbdadm primary in one line so it is as quick as possible. It was just running fine as a primary, so why can't I even make it a secondary, then make it primary again? Out of the 30+ times I have set this up, I have never encountered this problem. <br /><br />When either of the peers go offline, cat /proc/drbd shows:<br /><br /># cat /proc/drbd<br />version: 8.4.4 (api:1/proto:86-101)<br />GIT-hash: 599f286440bd633d15d5ff985204aff4bccffadd build by phil@Build64R6, 2013-10-14 15:33:06<br /><br /> 1: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r-----<br />    ns:0 nr:0 dw:0 dr:664 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0<br /><br />If I
restart DRBD and abort the timeout on the surviving node, it changes to this:<br /><br /># cat /proc/drbd<br />version: 8.4.4 (api:1/proto:86-101)<br />GIT-hash: 599f286440bd633d15d5ff985204aff4bccffadd build by phil@Build64R6, 2013-10-14 15:33:06<br /><br /> 1: cs:WFConnection ro:Secondary/Unknown ds:Consistent/DUnknown C r-----<br />    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0<br /><br />Here is my config:<br /><br />##########<br /><br />resource r0 {<br />protocol C;<br />net {<br />        cram-hmac-alg sha1;<br />        shared-secret "pazzwurd1";<br />        max-epoch-size 512;<br />        sndbuf-size 0;<br />    }<br />startup {<br />        wfc-timeout 30;<br />        outdated-wfc-timeout 20;<br />        degr-wfc-timeout 30;<br />    }<br />disk {<br />        on-io-error detach;<br />        fencing resource-only;<br />    }<br />syncer {<br />rate 100M;<br />}<br />handlers {<br />        fence-peer "/usr/lib/drbd/<a
href="http://crm-fence-peer.sh">crm-fence-peer.sh</a>";<br />        after-resync-target "/usr/lib/drbd/<a href="http://crm-unfence-peer.sh">crm-unfence-peer.sh</a>";<br />    }<br />volume 0 {<br />device /dev/drbd1;<br />disk /dev/mapper/vg_ottppencrzdb1-lv_pgsql;<br />meta-disk internal;<br />}<br />on <a href="http://db-node-1.myco.com">db-node-1.myco.com</a> {<br />address <a href="172.16.99.1:7789">172.16.99.1:7789</a>;<br />}<br />on <a href="http://db-node-2.myco.com">db-node-2.myco.com</a> {<br />address <a href="172.16.99.2:7789">172.16.99.2:7789</a>;<br />}<br />}<br /><br />##########<br /><br /><br />I have tried to remove the fencing handlers and it did not help. I haven't even gotten to the pacemaker stage yet anyways. I can send logs if needed, just tell me which ones you need.<br /><br />Thanks for any help.<br /><br />Mike<br /><hr /><br />drbd-user mailing list<br />drbd-user@lists.linbit.com<br /><a
href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br /></pre></blockquote></div></body></html>