Re: FreeBSD 15-20250822 NFSv4.1 server broken?

From: Cedric Blancher <cedric.blancher_at_gmail.com>
Date: Fri, 22 Aug 2025 15:04:55 UTC
On Fri, 22 Aug 2025 at 16:16, Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Fri, Aug 22, 2025 at 6:48 AM Cedric Blancher
> <cedric.blancher@gmail.com> wrote:
> >
> > On Fri, 22 Aug 2025 at 15:27, Rick Macklem <rick.macklem@gmail.com> wrote:
> > >
> > > On Fri, Aug 22, 2025 at 3:38 AM Cedric Blancher
> > > <cedric.blancher@gmail.com> wrote:
> > > >
> > > > Good morning!
> > > >
> > > > FreeBSD 15-2025082, NFSv4.1 server set up like this:
> > > > # sysrc nfs_server_enable=YES
> > > > # sysrc nfsv4_server_enable=YES
> > > > # sysrc nfsuserd_enable=YES
> > > > # sysrc nfscbd_enable=YES
> > > > # sysctl vfs.nfs.enable_uidtostring=1
> > > > # sysctl vfs.nfsd.enable_stringtouid=1
> > > > # sysctl vfs.nfsd.issue_delegations=1
> > > > # printf 'V4: / -sec=sys\n' >>'/etc/exports'
> > > > # service nfsd start
> > > > # cat /etc/exports
> > > > V4: / -sec=sys
> > > This line only defines where the NFSv4 root is and
> > > what security is required for system state operations
> > > (ones not using any files).
> > >
> > > You also need to export the file systems as separate
> > > lines. If using ZFS, you can do so via the "sharenfs"
> > > property or by additional line(s) written manually in
> > > /etc/exports. For other file systems, like UFS, you
> > > need to put the lines in /etc/exports manually.
> > >
> > > One (or more, if different client hosts get different
> > > flags) for each file system. Each line will look
> > > something like:
> > > /home -maproot=root -alldirs -network 192.168.1.0/24
> > >
> > > The simplest variant (if your system is just one
> > > file system) would be a line like:
> > > /
> > >
> > > See the examples section of "man exports".
> > >
> > > After updating /etc/exports, you need to...
> > > # service mountd reload
> > > to get mountd to update the exports in the kernel
> > > from what is in /etc/exports.
> > >
> > > rick
> > > ps: Yes, "man exports" is confusing. I plan on trying to
> > >       improve it someday.
> >
> > I tried the following setup after a clean install. It works with
> > FreeBSD 14.3, but fails with the latest FreeBSD 15 snapshot from
> > today.
> > Could you PLEASE have a look whether you get the same failures on
> > Linux as we did?
> Well, nothing should change with regard to this between 14.3 and 15.0.
> As for the snapshots, well, they have a lot of issues right now.
> (I will be trying a snapshot at some point soon, but I have been waiting
> for the dust to settle.)
>
> > ---- cut-here ----
> > sysrc rpcbind_enable="YES"
> > sysrc mountd_enable="YES"
> > sysrc nfs_server_enable=YES
> > sysrc nfsv4_server_enable=YES
> > sysrc nfsuserd_flags="-domain GLOBAL.LOC"
> > sysrc nfsuserd_enable=YES
> > sysrc nfscbd_enable=YES
> > sysctl vfs.nfs.enable_uidtostring=1
> > sysctl vfs.nfsd.enable_stringtouid=1
> > sysctl vfs.nfsd.issue_delegations=1
> >
> > mkdir /nfsdata
> > chmod a+rwxt /nfsdata
> >
> > # NFSv4.1 exports must come after the 'V4: /' line,
> > # otherwise you get a NFS4ERR_NOFILEHANDLE
> > printf 'V4: /\n' >'/etc/exports'
> The only suggestion might be to try..
> V4:/nfsdata
> and the mount with something like <server>:/.
>
> Both should work and, as you noted, did work for 14.3,
> so it shouldn't matter.
>
> I suspect it is just a snapshot problem, rick

I hope so, because we need O_NAMEDATTR. Which was the reason for
today's multidisciplinary test campaign.

FreeBSD 14.3 works fine as an NFSv4.2 server (thank you all!), but we
need FreeBSD 15.

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur