Mirror of Raidz for data reliability
Trent Nelson
trent at snakebite.org
Fri May 18 16:56:39 UTC 2012
Hi Marcelo,
On 5/17/12 9:34 PM, "Marcelo Araujo" <araujobsdport at gmail.com> wrote:
>2012/5/17 George Kontostanos <gkontos.mail at gmail.com>
>
>> On Thu, May 17, 2012 at 1:52 PM, George Kontostanos
>> <gkontos.mail at 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Š 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="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.
More information about the freebsd-fs
mailing list