Date: Thu, 4 Mar 2010 09:27:19 +0200 From: Nikolay Denev <ndenev@gmail.com> To: Freddie Cash <fjwcash@gmail.com> Cc: fs@freebsd.org Subject: Re: PoC: ZFS fail-over with HAST + carp(4) + devd Message-ID: <7C1E347F-CD36-4F54-814B-90BE4EB67C75@gmail.com> In-Reply-To: <b269bc571003030913u3987c7dfre51fd7860b89f7e4@mail.gmail.com> References: <b269bc571003030913u3987c7dfre51fd7860b89f7e4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 3, 2010, at 7:13 PM, Freddie Cash wrote:
> [Not sure if this should go to just fs@ or possibly current@ as well. I'll
> start with just fs@.]
>
> Thought I'd pass this along. It's a proof-of-concept setup I've been using
> to test HAST fail-over of a ZFS pool, using devd and carp(4). The original
> impetus for doing this was that ucarp doesn't work (for me) within a
> VirtualBox VM. Just hangs the VM. And, I prefer to use FreeBSD base tools
> whenever possible, so I thought I'd try and get it to work with carp(4).
>
> I know this isn't perfect as it (currently) relies on a "magic constant" and
> doesn't cover all the possible failure modes, but thought I'd pass it along
> to get your input, comments, criticisms, suggestions, etc. With a bit more
> work, it could be generalised a bit more to, for example, pull the resources
> list from /etc/hast.conf, and to work with non-ZFS setups. Perhaps someday
> it could be useful an an example in the HAST samples/ directory.?.
>
> With this setup, I can pull the plug on carp0 on the master node, and the
> hast devices and ZFS pool fail-over to the slave. And if I pull the plug on
> carp0 on the slave, everything fails over to the master again. And it works
> nicely with carp preempt enabled on the master node.
>
>
> Add the following stanzas to /etc/devd.conf:
> notify 10 {
> match "system" "IFNET";
> match "subsystem" "carp0";
> match "type" "LINK_UP";
> action "/usr/local/bin/carp-hast-switch master";
> };
>
> notify 10 {
> match "system" "IFNET";
> match "subsystem" "carp0";
> match "type" "LINK_DOWN";
> action "/usr/local/bin/carp-hast-switch slave";
> };
>
>
Hi,
It's a bit offtopic for fs-, but I'm just curious what FreeBSD version are you using with this?
My experience with 7.* is that LINK_UP/DOWN events are not generated for carp interfaces,
and I have just tested this in my devd.conf and it does nothing. I guess this is fixed in 8 or -CURRENT?
Regards,
Niki Denev
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C1E347F-CD36-4F54-814B-90BE4EB67C75>
