Linux server failover

failoverlinux

I have two Linux servers (CentOS6) – both are identically configured connected to the same switch with a direct link between them. I only have one external IP that is assigned to eth0 on both servers (connected to the internet switch) with the interface shutdown on server 2.

How can I failover to server 2 if server 1 dies – as stated they are linked directly so they can check for availability of each other via ping/tcp/udp. I toyed with Heartbeat but the documentation seems to be non-existent – not sure how to bring up an interface and start some services if the other server dies.

Best Answer

I would use Heartbeat. The problem with the docs is that Heartbeat is now a component of Pacemaker:

http://www.clusterlabs.org/wiki/Documentation

Heartbeat is sufficient to failover an IP address, but will not detect service failures (e.g., your httpd process dies). You don't have to set up the full Pacemaker configuration if you only care about IP addresses; in that case, you can use the version 1 (Heartbeat) configuration that uses /etc/ha.d/haresources as the resource list.

Related Topic