small logo

melfneerg.com

 - 'cos life is like that


[Blog]  [Pictures]  [Links]  [About
About the Author
Tudor Davies

author Tudor is a techie turned manager who fights like mad to keep his tech skills honed and relevant. Everything from web hosting, networking, *nix and the like. Constantly developing and co-ordinating with others to make the web a better (and easier to use) place.

carp

Tuesday, 22nd Feb 2011  Posted @ 09:34

So installing CARP was easy enough.

yum install carp -y
The you need to configure the file /etc/sysconfig/carp/vip-001.conf:
#Virtual IP configuration file for UCARP
# The number (from 001 to 255) in the name of the file is the identifier
# $Id: vip-001.conf.example 1527 2004-07-09 15:23:54Z dude $

# Set the same password on all mamchines sharing the same virtual IP
PASSWORD="[your password]"

# You are required to have an IPADDR= line in the configuration file for
# this interface (so no DHCP allowed)
BIND_INTERFACE="eth0"

# Do *NOT* use a main interface for the virtual IP, use an ethX:Y alias
# with the corresponding /etc/sysconfig/network-scripts/ifcfg-ethX:Y file
# already configured and ith ONBOOT=no
VIP_INTERFACE="eth0:0"

# If you have extra options to add, see "ucarp --help" output
# (the lower the "-k " the higher priority and "-P" to become master ASAP)
OPTIONS="-k 128 -P"
You then need to create a /etc/sysconfig/network-scripts/ifcfg-eth0:0 file that contains:
DEVICE=eth0:0
ONBOOT=no
BOOTPROTO=
IPADDR=[the VIP address]
NETMASK=255.255.255.255
USERCTL=yes
IPV6INIT=no
Then you just need the following to finish it all of:
chkconfig --add carp
chkconfig carp on
service carp start
If there are no errors - you are done and can move to the next machine to be part of the failover group.

Then test your failover. For me, I lost 1 ping during the swapover between boxes.

Next up - configuring pen for HTTP and DNS load balancing :)

[ no comments : Add ]

Tweet




layout and initial css based on the Qtractor page