Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2012 14:18:21 -0700
From:      Tim Gustafson <tjg@soe.ucsc.edu>
To:        freebsd-fs@freebsd.org
Subject:   Exporting ZFS File System to Multiple Subnets
Message-ID:  <CAG27QgQbwot1%2Bfu=2PmQYpaqKqb8Ob8sieb28XuXJDaWbZnKqQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I Googled around about exporting ZFS file systems to multiple subnets,
but most of what I found was years old, so I thought I'd ask to see
what the current state of things are.

We have about 2,000 file systems that we need to export to a handful
of subnets.  Most file systems are exported to the same set of
subnets.  If I were setting up /etc/exports, I would do something
like:

/export/home -alldirs -network=1.2.3.0/22
/export/home -alldirs -network=1.2.3.0/23
/export/projects -alldirs -network=4.5.6.0/22
/export/projects -alldirs -network=4.5.6.0/23

Perhaps followed by some additional lines to specify additional export
networks for specific filesystems:

/export/projects/foo -network 7.8.9.0/24
/export/projects/bar -network 9.8.7.0/24

But, FreeBSD's implementation of the "zfs sharenfs" property does not
allow multiple subnets to be specified.  And it seems that ZFS somehow
gets in the way of /etc/exports for ZFS file systems, so that if I
turn off sharenfs ("zfs inherit sharenfs tank/export; zfs inherit
sharenfs tank/projects") it actually blocks the export lines in
/etc/exports from being mounted.

So, how can I use FreeBSD and ZFS to export file systems in this way?
It seems like sharenfs is a dead end, and it also seems like
/etc/exports doesn't work because ZFS gets in the way.  This seems
like a really significant impediment to using FreeBSD as a ZFS file
server for anything other than the most basic of configurations.

Is there some magic that I can use to at least work around this
limitation for now?

Ideally, we'd just move to NFSv4, but a significant portion of our
clients are not NFSv4 ready, so that's not an option.

-- 

Tim Gustafson
tjg@soe.ucsc.edu
831-459-5354
Baskin Engineering, Room 313A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG27QgQbwot1%2Bfu=2PmQYpaqKqb8Ob8sieb28XuXJDaWbZnKqQ>