For a few months now, we’ve been working on migrating our physical architecture for YippieMove over to CloudSigma. We got everything up and running swiftly, with the exception of one thing: CARP.

As it turns out FreeBSD’s CARP implementation doesn’t really work very well in a virtual environment. (For those curious about the details, please see this mailing list post.)

In order to get up and running with CARP on CloudSigma, you need to do the following:

  • Download the FreeBSD kernel source
  • Download this patch (mirror)
  • Apply the patch (cd /usr/src/sys/netinet && patch -p0
  • Recompile and install your kernel (make sure to include “device carp” in your kernel config)
  • Add “net.inet.carp.drop_echoed=1″ to /etc/sysctl.conf
  • Reboot into the new kernel

That’s it. You should now be able to set up CARP as usual. For more information on how to configure CARP, please see my article Setting up a redundant NAS with HAST and CARP. That article also includes detailed instructions on how to download FreeBSD’s kernel source and how to compile your kernel.

As a technical side note, I got this working with FreeBSD 8.2 and the kernel source from the RELENG_8 branch.

Credits: Matthew Grooms for the patch and Daniel Hartmeier for great analysis.