Your Linux Data Center Experts

I'm proud to announce that I've built a FreeBSD port of heartbeat that I hope will soon be included in the official ports repository.

Sean has previously discussed the benefits of FreeBSD's ipfw for traffic shaping, and the benefits of Linux-ha for high availability clusters (see links above). Up until recently, it was possible, but time-consuming to combine the two. The difficulties with Linux-ha's heartbeat clustering software on FreeBSD systems were mostly due to difficulties resolving the package dependencies and problems with configure arguments missing from the normal installation method.

The standard way to configure heartbeat is using the included “ConfigureMe” script. However, due to the oldness of the libnet port on FreeBSD, the standard build method fails with fatal warning messages. It is necessary to use the –disable-fatal-warnings option to the “configure” script in addition to those normally set by ConfigureMe. Below is a list of required ports that I've been able to successfully build heartbeat with.

  • autoconf-2.59_2
  • automake-1.9.5
  • gmake-3.80_2
  • libnet-devel-1.1.2.1
  • libtool-1.5.10_1
  • perl-5.8.6_2

When I initially tested the port I encountered some additional finickiness with the FreeBSD configuration files compared to those used in Linux. The difference is due to the SO_BINDTODEVICE macro not being defined during the build on FreeBSD. This macro allows the socket to be bound to a particular interface on Linux systems, allowing it to distinguish between addresses that need to be receive heartbeat packets, from those that exist on the local system and should be ignored. The upshot is that on Linux systems, the ha.cf file can use multiple ucast lines and therefore be identical on both nodes of the cluster, but FreeBSD needs to have exactly one ucast line.

comments powered by Disqus

Join our other satisfied clients. Contact us today.