Page MenuHomeFreeBSD

Allow setting NFS server scope and owner.
ClosedPublic

Authored by mav on Sep 13 2021, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 7:30 AM
Unknown Object (File)
Thu, Mar 7, 6:37 PM
Unknown Object (File)
Feb 18 2024, 2:06 PM
Unknown Object (File)
Jan 30 2024, 5:53 PM
Unknown Object (File)
Jan 10 2024, 6:32 AM
Unknown Object (File)
Jan 9 2024, 1:04 PM
Unknown Object (File)
Dec 25 2023, 3:56 AM
Unknown Object (File)
Dec 20 2023, 8:46 AM
Subscribers
None

Details

Summary

By default NFS server reports as scope and owner major the host UUID value and zero for owner minor. It works good in case of standalone server. But in case of CARP-based HA cluster failover the values should remain persistent, otherwise some clients like VMware ESXi get confused by the change and fail to reconnect automatically.

The patch makes server scope, major owner and minor owner values configurable via sysctls. If not set (by default) the host UUID value is used.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mav requested review of this revision.Sep 13 2021, 8:05 PM
mav created this revision.

Looks fine to me. I'm not sure if it is worth worrying about,
but if someone were to set the sysctls when the server is
running, it could cause trouble.

If you think that this is worth worrying about, I think you could
define a "sysctl_XXX(SYSCTL_HANDLER_ARGS)" function
that return EINVAL if (newnfs_numnfsd > 0).

I do think having the three sysctls makes sense, just in
case there is a future case where one needs to be set and
the other can use hostuuid.

sys/fs/nfsserver/nfs_nfsdserv.c
4399

Looks fine. You could drop the "(void)" in front of
nfsm_strtom(). That was a habit I picked up decades ago,
when gcc cared.

This revision is now accepted and ready to land.Sep 14 2021, 3:07 PM
This revision was automatically updated to reflect the committed changes.