Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 2021 16:05:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 147881] [zfs] [patch] ZFS "sharenfs" doesn't allow different "exports" options for different hosts
Message-ID:  <bug-147881-3630-nhNe9rCRgt@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-147881-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-147881-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D147881

--- Comment #23 from dgilbert@eicat.ca ---
Before ZFS, sharing filesystems was rare and special.  Before ZFS, you
generally wouldn't have a filesystem per user or a filesystem per jail.

So the current "idea" (it's really more idea than method --- or if it's a
method, it's a horribly flawed one) in ZFS is to have an attribute per
filesystem that controls the share --- which is then implemented by collect=
ing
all the attributes into a file (for compatibility).  This is almost require=
d by
ZFS.

The alternative I see is to share a tree of filesystems as a unit --- I hav=
e no
idea if ZFS inodes could be trivially be combined into one NFS share --- th=
at
would be the barrier to this idea --- and understand that I'm not suggestin=
g it
--- I'm just exploring the head-space of shares being rare and special agai=
n.

Maybe the answer is to have the sharenfs specify an include file for exports
(or some future format)?  One in which $PATH is replaced (maybe a few other
substitution opportunities --- maybe even using other sharenfs attributes).=
=20
Example:

/home's sharenfs=3D"/usr/local/etc/shares.d/sharehome"
/home's sharenfs_FOO=3D"nobody"

/usr/local/etc/shares.d/sharehome:

PATH -maproot=3DFOO -network 192.168.0.0/24
PATH -maproot=3DFOO -network 2525:2525:1:2:3::/64

and this is injected into /etc/exports (assuming /home/dgilbert exists and
inherits):

/home -maproot=3Dnobody -network 192.168.0.0/24
/home -maproot=3Dnobody -network 2525:2525:1:2:3::/64
/home/dgilbert -maproot=3Dnobody -network 192.168.0.0/24
/home/dgilbert -maproot=3Dnobody -network 2525:2525:1:2:3::/64

equally, sharenfs could just specify a label... but y'all get the point.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-147881-3630-nhNe9rCRgt>