[CentOS] Floating VIP...

Fri May 11 13:03:25 UTC 2012
Tait Clarridge <tait at taiter.com>


On Fri, 2012-05-11 at 05:40 -0700, John Doe wrote:
> Hi,
> 
> right now I am using only one external server as a gateway for the internal servers.
> I would like to enable a fail-over on a second server.
> To implement the floating VIP, should I use heartbeat+pacemaker?
> Or is there something more "lightweight"?
> Basically, I just need server2 up the VIP when server1 is down, and server2 down the VIP when server1 is back up (or server 1 does not up the VIP seeing server2 has it already).
> 
> Thx,
> JD

Heartbeat is a pretty lightweight way of doing this. With any
failover/VIP setup there is always the possibility of a split-brain but
for the most part I haven't seen this happen in my environment.

Also, use IPaddr2 as the resource type as it will do an gratuitous arp,
significantly decreasing the failover time.

eg. [haresources file]

node.fqdn IPaddr2::10.10.10.10/24/eth1

Substitute your IP, mask and network interface.

There are some options you can set as well that tell it not to fail back
automatically, just so you can check the box that failed before pushing
services back to it.

Tait