Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2021 00:44:23 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>, freebsd-fs <freebsd-fs@freebsd.org>
Subject:   =?UTF-8?Q?Re=3a_autofs_+_default_/net_map_+_NFS4_=e2=80=94_how_to?= =?UTF-8?Q?=3f?=
Message-ID:  <4add2e1e-ecfe-75cb-e2a7-c30c3e3ab50a@FreeBSD.org>
In-Reply-To: <YQXPR0101MB096828A9397C565DF5ADC89CDD519@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
References:  <36080caf-4aa1-d262-cb93-9df9b72f884d@FreeBSD.org> <YQXPR0101MB096828A9397C565DF5ADC89CDD519@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13.05.2021 23:59, Rick Macklem wrote:

> You can do the exports lines without "-network..." and then they apply to all subnets.
> Not recommended unless you have an external firewall/nat gateway that is blocking
> incoming traffic to port#2049.

  I have different settings (-maproot) for different subnets (both IPv4 and IPv6), not shown (snipped) here for brevity.

  There is ZFS inheritable property which could be set to the root of FS hierarchy ("/usr/home" and "/usr/ports" in my case), which saves a lot of repetition, but it could be only single-line, so it is not applicable for multiple networks :-( There were patches, but all of them were declined as "incompatible with other systems".

> I know nothing about autofs and never use it. (/etc/fstab is your friend;-)

  Not on Laptop which could see server 50% of the time. It could be "noauto" mounts, but then you need root to mount them and you need to unmount them before leaving home with laptop, or you could have bad and long timeouts later.

> I suspect changing your V4: lines to specify "/" may work around this, since the
> mount paths then look the same as for NFSv3.

  And exporting "/" via NFSv3 lines too, as "V4" is only addition to "classic" export lines, and will not work if it will point to non-exported FS.

  To be honest, I don't understand why NFS export is done on local file system basis, not arbitrary local subtree, on one or several FSes, in 2021.
  Maybe, it was useful in 1984, but now samba could export any subtree, crossing local FS boundaries or not, from root or from any point in tree.
  Why NFSv4 server could not do the sameand need to explicitly export each FS in hierarchy?! With ZFS we could have very deep hierarchies.
  To be honest, I've wanted to add "${HOME}/archive" (for different snapshot retention policy) to each user homedir at one moment in time, but then decided that it is too much, to add twice more lines to /etc/exports.

-- 
// Lev Serebryakov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4add2e1e-ecfe-75cb-e2a7-c30c3e3ab50a>