Hi Lars, thanks for your response.<div><br></div><div>What I'm trying to achieve is a load balanced MySQL cluster, where my application could write to both MYSQL servers, under DRBD.</div><div>I'm actually using OCFS2 as the filesystem. But after several hours my nodes are always getting disconnected due to the failure I pointed out in the last message.</div>
<div><br></div><div>The reason I'm running DRBD in dual primary mode, is that I expect to have MySQL writing on both nodes. Am I missing something?</div><div><br></div><div>What benefit would I have by running a Primary/Secondary configuration, instead of a Primary/Primary? </div>
<div><br></div><div>Best regards,<br>Thiago Vinhas<br>
<br><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 2:27 PM, Lars Ellenberg <span dir="ltr"><<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Jun 23, 2011 at 07:39:00AM -0300, Thiago Vinhas wrote:<br>
> Hi,<br>
><br>
> I'm testing a DRBD+MySQL environment in production, but after a while the<br>
> second node always gets disconnected, and I have no idea if it's a hardware<br>
> problem or missconfiguration.<br>
> The second node is not even mounted. I'm just replicating the data, not<br>
> using it.<br>
><br>
> The error is on the end of the message. Here is my conf:<br>
><br>
><br>
> resource r0 {<br>
> meta-disk internal;<br>
> device /dev/drbd0;<br>
> disk /dev/sda4;<br>
><br>
> syncer { rate 33M; }<br>
><br>
> handlers {<br>
> split-brain "/etc/init.d/mysql stop";<br>
> }<br>
><br>
> net {<br>
> allow-two-primaries;<br>
<br>
</div>WHY?? You very likely do not want two primaries,<br>
only you do not know it yet ;-)<br>
<div class="im"><br>
<br>
> after-sb-0pri discard-zero-changes;<br>
> after-sb-1pri discard-secondary;<br>
> after-sb-2pri disconnect;<br>
> data-integrity-alg crc32c;<br>
<br>
</div>Have you read<br>
<br>
<a href="http://www.mail-archive.com/drbd-user@lists.linbit.com/msg03373.html" target="_blank">http://www.mail-archive.com/drbd-user@lists.linbit.com/msg03373.html</a><br>
<div class="im"><br>
<br>
> ko-count 4;<br>
> }<br>
><br>
> startup { become-primary-on both; }<br>
<br>
</div>Why??<br>
You do not want that.<br>
Really.<br>
Most people trying to use "dual primary DRBD"<br>
are really not needing it.<br>
<br>
If you think you really want it, make sure that you understand,<br>
and are able to deal with, the additional complexity it involves.<br>
<br>
You realize of course that concurrent access with standard file systems<br>
simply does not work, for that you need to use OCFS or GFS.<br>
<div><div></div><div class="h5"><br>
> on stewart { address <a href="http://192.168.0.1:7789" target="_blank">192.168.0.1:7789</a>; }<br>
> on prost { address <a href="http://192.168.0.2:7789" target="_blank">192.168.0.2:7789</a>; }<br>
> }<br>
><br>
><br>
> Is there something wrong in my conf? Should I change something?<br>
> Another problem is that after the second node gets disconnected, I have to<br>
> reconnect it my hand my running "drbdadm connect r0". Aparently after<br>
> running it the nodes get quickly re-synced (less then a minute), and the<br>
> previously disconnected node starts as Secondary, so I had to run "drbdadm<br>
> primary r0".<br>
><br>
> Both nodes are Dell PowerEdge R710 with 48GB of ram, running RHEL 5.6 and<br>
> DRBD 8.3.10 (from ElRepo).<br>
><br>
> Am I missing something here?<br>
><br>
><br>
> Thanks for any help!<br>
><br>
> Regards,<br>
> Thiago Vinhas<br>
> block drbd0: Digest integrity check FAILED: 63266864s +4096<br>
> block drbd0: error receiving Data, l: 4136!<br>
> block drbd0: peer( Primary -> Unknown ) conn( Connected -> ProtocolError )<br>
> pdsk( UpToDate -> DUnknown )<br>
> block drbd0: new current UUID<br>
> 66983E6BBEE733F5:6157ABDB87926AA5:0001000000000001:5905CD0F6B61A6A9<br>
> block drbd0: asender terminated<br>
> block drbd0: Terminating asender thread<br>
> block drbd0: Connection closed<br>
> block drbd0: conn( ProtocolError -> Unconnected )<br>
> block drbd0: receiver terminated<br>
> block drbd0: Restarting receiver thread<br>
> block drbd0: receiver (re)started<br>
> block drbd0: conn( Unconnected -> WFConnection )<br>
> block drbd0: Handshake successful: Agreed network protocol version 96<br>
> block drbd0: conn( WFConnection -> WFReportParams )<br>
> block drbd0: Starting asender thread (from drbd0_receiver [7794])<br>
> block drbd0: data-integrity-alg: md5<br>
> block drbd0: drbd_sync_handshake:<br>
> block drbd0: self<br>
> 66983E6BBEE733F5:6157ABDB87926AA5:0001000000000001:5905CD0F6B61A6A9 bits:0<br>
> flags:0<br>
> block drbd0: peer<br>
> 4C9FC71A2D13AF9F:6157ABDB87926AA5:0001000000000000:5905CD0F6B61A6A9 bits:40<br>
> flags:0<br>
> block drbd0: uuid_compare()=100 by rule 90<br>
> block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0<br>
> block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0 exit<br>
> code 0 (0x0)<br>
> block drbd0: Split-Brain detected but unresolved, dropping connection!<br>
> block drbd0: helper command: /sbin/drbdadm split-brain minor-0<br>
> block drbd0: meta connection shut down by peer.<br>
> block drbd0: conn( WFReportParams -> NetworkFailure )<br>
> block drbd0: asender terminated<br>
> block drbd0: Terminating asender thread<br>
> block drbd0: helper command: /sbin/drbdadm split-brain minor-0 exit code 0<br>
> (0x0)<br>
> block drbd0: conn( NetworkFailure -> Disconnecting )<br>
> block drbd0: error receiving ReportState, l: 4!<br>
> block drbd0: Connection closed<br>
> block drbd0: conn( Disconnecting -> StandAlone )<br>
> block drbd0: receiver terminated<br>
> block drbd0: Terminating receiver thread<br>
><br>
> Abs,<br>
> Thiago Vinhas<br>
<br>
</div></div>> _______________________________________________<br>
> drbd-user mailing list<br>
> <a 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>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
__<br>
please don't Cc me, but send to list -- I'm subscribed<br>
_______________________________________________<br>
drbd-user mailing list<br>
<a 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>
</blockquote></div><br></div>