HAST + ZFS + NFS + CARP

Ben RUBSON ben.rubson at gmail.com
Fri Jul 1 11:58:46 UTC 2016


> On 01 Jul 2016, at 13:40, Miroslav Lachman <000.fbsd at quip.cz> wrote:
> 
> Julien Cigar wrote on 07/01/2016 12:57:
> 
>>>> why...? I guess iSCSI is slower but should be safer than HAST, no?
>>> 
>>> do your testing, please. even with simulated short network cuts. 10-20
>>> secs are way enaugh to give you a picture of what is going to happen
>> 
>> of course I'll test everything properly :) I don't have the hardware yet
>> so ATM I'm just looking for all the possible "candidates", and I'm
>> aware that a redundant storage is not that easy to implement ...
>> 
>> but what solutions do we have? It's either CARP + ZFS + (HAST|iSCSI),
>> either zfs send|ssh zfs receive as you suggest (but it's
>> not realtime), either a distributed FS (which I avoid like the plague..)
> 
> When disaster comes you will need to restart NFS clients in almost all cases (with CARP + ZFS + HAST|iSCSI) and you will lose some writes too.
> And if something bad happens with your mgmt scripts or network you can end up with corrupted ZFS pool on master and slave too - you will need to recovery from backups. For example in some split brain scenario when both nodes will try to import pool.

Of course you must take care that both nodes do not import the pool at the same time.
For the slave to import the pool, first stop iSCSI targets (ctld), and also put network replication interface down, to be sure.
Then, import the pool.
Once old master repaired, export its pool (if still imported), make its disks iSCSI targets and give them the old slave (promoted master just above).
Of course it implies some meticulous administration.

> With ZFS send & receive you will lose some writes but the chance you will corrupt both pools are much lower than in the first case and the setup is much simpler and runtime error proof.

Only some ?
Depending on the write throughput, won't you loose a lot of data on the target/slave ?
How do you make ZFS send/receive quite realtime ?
while [ 1 ] do ; snapshot ; send/receive ; delete old snapshots ; done ?

Thanks !


More information about the freebsd-fs mailing list