ZFS + NFS + multiple hosts/mount options ..?

Julien Cigar julien at perdition.city
Tue Aug 30 19:15:20 UTC 2016


On Tue, Aug 30, 2016 at 06:46:44PM +0200, Lev Serebryakov wrote:
> On 30.08.2016 18:31, Willem Jan Withagen wrote:
> 
> >>> Is there a way through the zfs set sharenfs="..." property to share
> >>> data/somefs readonly to host "dev.lan" _and_ read/write to host 
> >>> "duvel.prod.lan" ? Or should I just set sharenfs="off" and use
> >>> /etc/exports (I'm using NFS4) ? It seems impossible to have multiple
> >>> hosts/options/... when the sharenfs property is used ..
> >>  No luck here. I've raised this question multiple times withoput any
> >> reaction. Here is (very old) PRs with patch, which implements this:
> >>
> >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=147881
> >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202820
> >>
> > 
> > I'd say, forget about getting any flexible through sharenfs.
>   WHY?!
> 
> > Did that discussion about 3 years ago, and it boiled down. Don't dare to
>   I don't see any good reason to not support this, aside "It will not be
> compatible with Illumos". I don't buy this, sorry. Any other reasons?
> 
> > change it because the people doing ZFS don't like it.
>  There is one BIG problem: deep ZFS hierarchies. If I need to export 100
> FSes (100 users' home directories, for example) in one ZFS tree to 4
> networks (2xIPv4, 2xIPv6) I need to add 400 (!!!) lines to /etc/exports
> by hands. All these lines will be virtually the same, and good luck to
> maintain this mess.

I agree with you, although in my case it's not so much an issue as
everything is managed by SaltStack ... but it's rather ugly to have 100+
lines in /etc/exports.

What's more problematic is that it's virtually impossible (without ugly 
hacks) to share a simple zfs fs "ro" to one net, and "rw" to another 
one with the sharenfs property

Anyway, I ditched sharenfs, zfs share, ... and I use /etc/exports

> 
>  If "sharenfs" supports multiple hosts/networks, I need to set this
> property ONCE (on zpool/home, parent of all FSes in question) and IT'S
> ALL! And if I need to change same options, I need to change it ONCE and
> re-export ZFS.
> 
>  Unfortunately, it is NOT enough to export parent FS :(
> 
> -- 
> // Lev Serebryakov

-- 
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20160830/8ebf0a77/attachment.sig>


More information about the freebsd-fs mailing list