Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2012 09:55:24 -0700
From:      Trent Nelson <trent@snakebite.org>
To:        "araujo@FreeBSD.org" <araujo@FreeBSD.org>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: Mirror of Raidz for data reliability
Message-ID:  <CBDBEF7C.2B265%trent@snakebite.org>
In-Reply-To: <CAOfEmZj9mPnU%2BxgYP8qNWdPL_seqO7vxvwB-ZNOr3dGEUW5dbQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Marcelo,=20

On 5/17/12 9:34 PM, "Marcelo Araujo" <araujobsdport@gmail.com> wrote:

>2012/5/17 George Kontostanos <gkontos.mail@gmail.com>
>
>> On Thu, May 17, 2012 at 1:52 PM, George Kontostanos
>> <gkontos.mail@gmail.com> wrote:
>>
>>
>> Ok, after reading more carefully your first post I realized what you
>> are trying to do.
>>
>> 2 Machines, 2 different controllers. Yet interconnected. So, in a way
>> both machines would be able to see both controllers.
>>

>> 2) Both machines have to be online and the pool has to be mounted
>> readonly on the standby! You don't want both of them to accidentally
>> write at the same pool.
>>
>>
>Not no.You can use Devd to start some scripts to mount the FS in another
>machine or something like that.
>But I can't be focused only in this scenario, I believe there are much
>more
>application for it.

I'm in a similar situation with Snakebite.  I have two boxes that can see
a common set of disks (via FC SAN).  I'm interested in failover, but like
you, I don't want to use HAST -- why duplicate data when both machines can
access the disks?

I came across these articles yesterday, which are pretty neat:

	CARP and devd on FreeBSD:	http://blather.michaelwlucas.com/archives/224
	Automated CARP/HAST
Failover:	http://blather.michaelwlucas.com/archives/241

(Both of those posts reference lots of other articles; all of which I also
found to be very good reads.)

The author uses CARP/devd/HAST to automate failover and rebuild.  Our
situation is a little different because we don't want/need to use HAST.

So, my thinking is=8A because both machines can see all disks, the master
could import the zpool as normal, and the slave could import it read-only.
 (Or not import it at all...)

Then, when CARP detects that the master has failed, some script will kick
in on the slave (via devd?) and re-mount the zpools read-write.  (Or
import them for the first time.)

That approach seems like a feasible starting point to me.  It'll take a
bit of fiddling of course, as FreeBSD isn't really set up to utilize ZFS
like that.  I'm planning on having my own /etc/rc.* type scripts that
manually import/load zpools, rather than using /etc/rc.conf's
zfs_enable=3D"YES" (which will definitely break things).

Now the only thing that confuses me about your original e-mail is with
regards to adding raidz vdevs.  Can I enquire what you'll actually be
doing with the zpools once they're loaded?  I.e. You mentioned failover;
what services will you be providing (NFS?  Apache?) that you want to fail
over?

In my case, I'd *like* to be able to offer NFS, iSCSI and FC-target-mode
in such a way that if the master dies, failover to the slave is automatic
and transparent.

At least, that's the ideal scenario :-)  It'll sure take a bit of
fiddling/hacking to get that working.

Regards,

	Trent.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CBDBEF7C.2B265%trent>