debian – mjs.fyi Technology, Cyber Security, Digital Transformation, and Beer Sat, 10 Sep 2011 22:53:11 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 UCARP and Squeeze /2011/09/ucarp-and-squeeze/ /2011/09/ucarp-and-squeeze/#comments Sat, 10 Sep 2011 22:53:11 +0000 http://forsetti.wordpress.com/?p=84 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!
]]>
/2011/09/ucarp-and-squeeze/feed/ 3