KVM with failover setup

1

1

We have a server running several virtual machines using KVM. While it works well, we are worried about potential hardware failures on that one physical server.

We do backup nightly to a different physical server, but restoring the backups takes a while. If the whole system would get toasted, we would have several hours of downtime.

We would like to have a failover system (i.e. a different physical server) that we can switch to if the main server fails at some point.

I have several questions regarding this:

  • How would we make the failover system mirror the main one? It should be different physical machines so we can make sure that a single hardware failure doesn't kill everything. Is there software for something like RAID 1 over network? Is this somehow related to load balancing?
  • How would we dispatch requests to the failover machine if the main one doesn't reply? Should we regularly ping it and update DNS information if it doesn't reply on time?
  • It would be great to have something that would work at the virtual machine level, i.e. if a single virtual machine is down, requests to that one should be forwarded to the copy on the failover system.

futlib

Posted 2012-04-16T14:04:48.423

Reputation: 1 129

Answers

1

One of the best solution for your scenario is DRBD+Heartbeat. DRBD replicates disk/partitions/LVs between serversin real time. It isn't recommend for servers that has a lot of I/o but works very well for small and medium environemnts.

The documentation is very good, look at the site. There is a sections called "DRBD-enabled applications" with examples and ready to use solutions. You can use "Using Xen with DRBD" as a base, adapting it to KVM.

I have a lof ot servers with this solution and works perfect.

Diego Woitasen

Posted 2012-04-16T14:04:48.423

Reputation: 818