[nSLUG] XEN & Heartbeat

Ian Campbell ian at slu.ms
Tue Jun 2 23:13:46 ADT 2009


On Tue, Jun 02, 2009 at 10:35:25PM -0300, Oliver Baltzer wrote:
> Hi Miles,
> 
> I do not have experience with a particular setup like this, but if you
> do not have access to a multi-path SAN I would use DRBD to simply mirror
> the SATA devices on both physical machines including the configurations
> of the VM and then only start the VMs you want on each of the systems.

If I read his email right, that's sort of what he's planning. He said
heartbeat to keep the disks in sync, I assume he meant DRBD for that
part though, since most people use them together.

> Then, if one of the physical machines goes away, you can automatically
> start the lost VM on the remaining physical system. Of course that would
> be like booting from a cold shutdown. You would loose any open sockets
> and data that was not flushed on the lost machine as well as any DRBD
> data that was in transit. However, any stand-by based HA solution would
> have these problems and the damage is typically within acceptable limits.

Yeah. Assuming it was planned downtime, I think Xen has VM migration
tools now, subject to some disk store requirements. Nitpicking, if
it's unplanned downtime I don't think hot-hot HA would save you
either... since you'd have unfinished transactions (disk, network, or
something higher level like a DB request) ... if I'm wrong on that,
please let me know, it would be neat to see how they did it.

I got the impression he wanted load balancing more than redundancy
though... although now that I read his email I'm not sure what kind of
balance he's looking for.

Miles, which of these are you looking for?

1) Web/FTP/iFolder on Left, Mail on Right, each running Hot-Cold (you
   could bring Mail up on Left or Web up on Right if you had to)
2) Web/FTP/iFolder and Mail on both, running Hot-Hot (both services
   running on both machines all the time)
3) Something else

Assuming 1, Oliver's solution is probably the best, although it would
likely be that it would be more like restarting from a crash than a
cold boot. I expect you would need a fsck, probably mysql's table
check etc. because the VM's disk would have been left in a bad state.

Assuming you want both sides running all the time and sharing the
load... that's easier for some of your software than others. Apache is
dead simple. Postfix is even easier, make two MX records of equal
weight. It won't actually be equally balanced, but it's close enough.

FTP and iFolder might be a little messier. MySQL will be a pain. Your
options are something silly like circular replication (shudder) or a
real solution like MySQL Cluster... but that will require a third
machine.



More information about the nSLUG mailing list