Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I am seeing a lot of conflicting viewpoints out there on using STONITH with a 2-node DRBD/Pacemaker/Corosync cluster for replicating MySQL data. The example I could find on the Pacemaker website seems to turn it off, but a lot of other places say you should keep it on..... My setup will be 2 nodes with 2 interfaces, one physically connected to the other machine, the other hooked up to a switch. In that case, if I have redundant communications is STONITH necessary? If a server loses both network connections it wont be receiving any MySQL data anyway, and when it comes back up I plan to set the stickyness to infinite so it (shouldn't) won't try to become the master. In this case is STONITH necessary or even advisable?

share|improve this question

1 Answer 1

The best thing to do is test what actually happens under different failure modes, to make sure there is no single failure that could cause both MySQL servers to try to become masters.

Test disabling the internet connection on one server. See what happens on both servers, and watch what happens when you bring it back up.

Do the same for any redundant connections. Then do the same with disabling ALL network connections at once.

One reason for not doing STONITH on a two node cluster is it is fairly easy to end up with both nodes trying to kill the other, and actually succeeding. You need to test your setup to make sure that they don't either both shutdown, or both keep running as masters and get your database out of sync.

One other thing I recommend, while you are testing it, before it goes into production: Intentionally break it. Do something that will cause mysql and drbd to get out of sync, and learn how to fix it. Write down what you needed to do to fix it. Because it's much better to know how to do that BEFORE you really need to.

share|improve this answer
    
Yes, the "lovers suicide" is what I am most afraid of(well either that or both lovers insisting that they have "hand").... can you configure Corosync to use multiple connections? And is using the DRBD connection for Corosync a good idea? My gut feeling is that it wont matter since they are relatively small, infrequent UDP messages but... –  user439407 Aug 23 '12 at 12:22
    
I haven't used corosync before, but this looks promising: lists.linux-foundation.org/pipermail/openais/2011-February/… –  Grant Aug 23 '12 at 12:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.