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.

Does anyone have experience configuring drbd with heartbeat between 2 virtual linux machines (VMWare Infrastructure)?

The problem I am running into is that heartbeat likes multiple data paths to see its peer node. For instance, it likes to have a network connection to the peer, maybe one to it's gateway, and a serial cable to its peer - improving the likelihood that when it detects a peer outage, it's actually down, and not due to network congestion or something.

On a virtual machine however, the serial port and ethernet port (and all other ports) are virtual - so really, there's only one data path (correct?)

(I know that VMWare supports physical serial cables between devices, but our vm's are hosted remotely, and physical cables would prevent host migrations, which is not acceptable.)

In our case we are seeing timeouts between the heartbeat peers, even though they are running on the same host machine.

How can I configure drbd / heartbeat to be more robust when running on virtual machines

share|improve this question

3 Answers 3

The idea to have multiple data paths is not new. It is a basic concept to avoid split brain situations.

But you face exactly the same problem on physical servers - I do not understand why you link this question to VMs?

Multiple data paths can be established with physically distinct networking hardware - which also makes sense in big environments, when you separate the back-end from the font-end of the servers. This would give you two networks, which you can also access on VMs.

If DRBD and heartbeat comes into play a third phsically distinct network might make sense for high-speed dedicated data replication (also often recommended for iSCSI) - this could be the third hb-network, too.

Now to my own experience: We have these three separated networks - which are present on the VM-servers and are being bridged to the VMs as well - so they can run heartbeat across three separate lines...

Another possibility to avoid network failures would be bonding devices for the same networks. If there is no SPOF in your networking system - also a good solution (which gives you at least one HA-network).

share|improve this answer

Have you looked whether the VMs complain about dropped interrupts or similar things - maybe the host hardware is just overloaded or not enough ressources are allocated to your VMs?

If it's a flaky or overloaded network, the right thing to do would of course be fixing that; but if your hosting provider is not keen on that, can you use multiple physical paths by attaching multiple bridged networks to different host devices (hopefully on different switches)?

Just using redundant network paths via 802.3ad couldn't hurt in that case, either.

A commenter on another question mentioned split-brain - that's one thing you want to avoid at all cost: Normally a STONITH script would e.g. turn off a networked PDU strip on the other host so that the other host is down for sure; in a VM you might try a script that switches the other VM off via the VMware API.

Finally - maybe DRBD is just not right for your scenario. If you have a SAN, you may want to open the same device on the fabric on both VMs as a raw disk and then run OCFS2 or a similar cluster FS on it. Friends have seen OCFS2 run rock-solid on up to four nodes simultaneously, which would free you up to do multi-node clusters with heartbeat2 instead of being locked in with two-node fail-over like on heartbeat 1 by drbd.

Caveat emptor: heartbeat 2 uses XML config files. Not everyone (e.g., me) likes that.

share|improve this answer
    
Thanks alot for the ideas! –  Brent May 29 '09 at 16:56

Not only does DRBD not use a serial cable, it can't! I have no idea what you're talking about!

On top of that, it does not do squat about multiple data paths, it just communicates to the other node through a plain old TCP connection. The kernel's routing, the switches, routers and firewalls deal with this, DRBD has got nothing to do with it.

share|improve this answer
    
Oh, you're right - it's heartbeat - let me clarify the question... –  Brent May 29 '09 at 16:17
    
+1 and even if it could it would be a bad idea. If serial works but not the rest of your network, you want to consider that node down ;-) –  Antoine Benkemoun May 29 '09 at 16:18
    
The problem is that when one peer can't see the other, both become primary and take over the same IP address, which causes a split-brain condition and data integrity problems. I don't want a busy server or network connection to falsely indicate that the server is non-functional –  Brent May 29 '09 at 16:21

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.