Page MenuHomeFreeBSD

Allow setting NFS server scope and owner.
ClosedPublic

Authored by mav on Sep 13 2021, 8:05 PM.
Tags
None
Referenced Files
F102782805: D31952.diff
Sun, Nov 17, 3:18 AM
Unknown Object (File)
Wed, Nov 6, 7:59 AM
Unknown Object (File)
Wed, Oct 23, 1:53 AM
Unknown Object (File)
Oct 3 2024, 12:55 AM
Unknown Object (File)
Oct 2 2024, 7:59 AM
Unknown Object (File)
Oct 1 2024, 12:13 AM
Unknown Object (File)
Sep 30 2024, 4:13 PM
Unknown Object (File)
Sep 29 2024, 11:31 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 Skipped
Unit
Tests Skipped

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.