Re: FreeBSD 15-20250822 NFSv4.1 server broken?
- Reply: Cedric Blancher : "Re: FreeBSD 15-20250822 NFSv4.1 server broken?"
- In reply to: Cedric Blancher : "FreeBSD 15-20250822 NFSv4.1 server broken?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Aug 2025 13:27:35 UTC
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.
>
> Linux 6.16 kernel, attempting to mount and use:
> # mount -o vers=4.1 10.49.202.66:/nfsdata /mnt_freebsdnfs/
> # cd /mnt_freebsdnfs/
> # ls -la
> ls: reading directory '.': Input/output error
> total 0
> # cd all
> # ls -la
> ls: reading directory '.': Input/output error
> total 0
>
> It looks that the Input/output error is caused by a NFS4ERR_NOFILEHANDLE
>
> Is this setup correct, or is there a bug in the FreeBSD NFSv4.1 server?
>
> Ced
> --
> Cedric Blancher <cedric.blancher@gmail.com>
> [https://plus.google.com/u/0/+CedricBlancher/]
> Institute Pasteur
>