Build failover ZFS, like HA-Storage from Solaris

Freddie Cash fjwcash at
Fri Feb 18 21:01:40 UTC 2011

On Fri, Feb 18, 2011 at 1:08 AM, Denny Schierz <linuxmail at> wrote:
> we're searching for an alternative failover solution with ZFS. We have
> two nodes connected to _one_ SAS Storage (so, no DRBD or anything
> possible) and we want, to export zfs volumes via ISCSI to other systems.
> If the primary node fails, the ZFS Pool (which also does 8 times raidz2)
> has to be move to the secondary node. If that is done, the global IP
> (carp?) switch to the new node.
> It works with HA-Storage from Solaris 10, but the license are too
> expensive on none sun-hardware :-/ for our university.
> Any solutions?

FreeBSD + ZFS + HAST + CARP + devd will do what you want.

You create a separate hast device for each physical harddrive in the
system.  That "mirrors" the drives between the two servers.

Then you create the ZFS pool on top of the hast devices (use
/dev/hast/* instead of /dev/da*).

Then you configure CARP to provide the shared virtual IP between the
two systems.  Configure your iSCSI setup to use this IP.

Then you write some scripts to handle the orderly tear down of the ZFS
pool on one system, and to handle the orderly importing of the pool on
the other system.  And you hook those scripts into devd, so that when
CARP advertises that it is switching which system is master, then ZFS
and iSCSI switches with it.

Michael Lucas took some scripts I wrote to do the above and made them
a better.  You can find a lot of information on doing the above here:

I've used the above in a VM test setup using a ZFS pool with one
raidz1 vdev and iSCSI.  Works nicely.  You have to make sure your
iSCSI clients can handle a small window of inaccessibility while the
ZFS pool imports on the slave system.

We're planning on moving this to real hardware (24-hot swap drive bays
in each server) as soon as it arrives (hopefully next week).

Freddie Cash
fjwcash at

More information about the freebsd-cluster mailing list