Month: September 2011

UCARP and Squeeze

IP fault tolerance on Debian Squeeze couldn’t be easier than with UCARP!:

  • Install UCARP on all nodes:
    apt-get install ucarp
  • Edit /etc/network/interfaces on all nodes, replacing <CLUSTER IP> and <PASSWORD> as appropriate:
    iface eth0 inet static
    ...
    ucarp-vid 3
    ucarp-vip <CLUSTER IP>
    ucarp-password <PASSWORD>
    ucarp-xparam -n
    iface eth0:ucarp inet static
    address <CLUSTER IP>
    netmask 255.255.255.255
  • Reboot, and you’re done!  <CLUSTER IP> will now be available from one of the nodes in your cluster at all times!

A few notes:

  • All nodes in your UCARP cluster must be in the same subnet, and the shared cluster IP must also be in the same subnet.
  • UCARP does not do cluster resource management for you, but it does provide hooks.  You will need to write some scripts to handle unmounting/mounting of shared storage, etc.
  • UCARP does not detect service failures, only whole-host (or IP stack) failures.  But if you can detect the failure, simply send SIGUSR2 to the ucarp process to force into passive mode, forcing another node to become master.
All-in-all, about as simple and sufficient as one can get!