HAST, zfs and local mirroring
Freddie Cash
fjwcash at gmail.com
Fri Jun 3 16:38:10 UTC 2016
On Fri, Jun 3, 2016 at 1:40 AM, Eugene M. Zheganin <emz at norma.perm.ru>
wrote:
> Hi.
>
> On 02.06.16 19:50, Slawa Olhovchenkov wrote:
> > I am suggesting next setup:
> >
> > node0:
> > own pool zroot0: mirror-0: local_disk0
> > remote-iscsi_disk1/1
> > local_disk1: exported by iscsi as remote-iscsi_disk0/1 to node1
> >
> > node1:
> > own pool zroot1: mirror-0: local_disk0
> > remote-iscsi_disk0/1
> > local_disk1: exported by iscsi as remote-iscsi_disk1/1 to node0
> >
> >
> > No HAST.
> > Disks synced by ZFS over iSCSI.
> But this way I will get two independent zfs pools (or I still didn't get
> it), one half of each will be stored on another machine. And I need
> something different - a continuously replicated disk resource, that
> would be available on both machines in case either will crash. Cluster
> filesystem would be fine, but as far as I know there's no such thing on
> FreeBSD, so I accept it will be unavailable on slave while mounted as
> read-write on the master. HAST looks like a thing thats fits my
> requirement, only that I wank it to be redundant inside each host too,
> and all the documentation shows examples without local redundancy.
>
Which is exactly the setup that I showed you.
Host1: diskA diskB
Host2: diskC diskD
You create two HAST resources:
hast1: using diskA and diskC
hast2: using diskB and diskD
Then create a ZFS pool using hast1 and hast2 as a mirror vdev.
That way, if you lose diskA, then diskC takes over, and ZFS never even
notices.
If you lose both diskA and diskC, you still have half the ZFS mirror vdev
running, so the pool is intact.
If you lose all of Host1, Host2 takes over, imports the pool, and carries
on.
HAST + CARP (to manage the fail-over and pool export/import) + ZFS gives
you everything (well, mostly) that you want. There will be a smidgeon of
downtime during the host-to-host fail-over that may or may not be workable
in your setup.
The other option is to investigate the Ceph clustered filesystem. I
believe there's been work ongoing this year to get it working on top of ZFS
on FreeBSD.
There's also GlusterFS, which has seen a bunch of work to get it working on
top of ZFS on FreeBSD.
No idea how well those last two work.
--
Freddie Cash
fjwcash at gmail.com
More information about the freebsd-stable
mailing list