The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=4f184fd35d81bbd85284d47d2a65aeece67e87d4
commit 4f184fd35d81bbd85284d47d2a65aeece67e87d4 Author: Rick Macklem <[email protected]> AuthorDate: 2025-12-24 16:29:29 +0000 Commit: Rick Macklem <[email protected]> CommitDate: 2025-12-24 16:29:29 +0000 nfsd.8: Add a short paragraph w.r.t. NFSv3 vs NFSv4 setup The nfsd can be configured to support NFSv3, NFSv4 or both of them. This patch adds a short paragraph to nfsd.8 to explain this. This is a content change. Reviewed by: kib, zaiee (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54279 --- usr.sbin/nfsd/nfsd.8 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8 index 2e5724dbce33..79085d33230c 100644 --- a/usr.sbin/nfsd/nfsd.8 +++ b/usr.sbin/nfsd/nfsd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 30, 2025 +.Dd December 23, 2025 .Dt NFSD 8 .Os .Sh NAME @@ -46,7 +46,7 @@ NFS server .Sh DESCRIPTION The .Nm -utility runs on a server machine to service NFS requests from client machines. +utility runs on a server machine to service NFSv4 and/or NFSv3 requests from client machines. At least one .Nm must be running for a machine to operate as a server. @@ -54,6 +54,62 @@ must be running for a machine to operate as a server. Unless otherwise specified, eight servers per CPU for UDP transport are started. .Pp +The +.Nm +server may be configured to serve NFSv3, NFSv4 or both of them. +When +.Bd +nfs_server_enable="YES" +.Ed +is set in +.Xr rc.conf 5 , +.Nm +is configured for NFSv3 only, by default. +To configure the +.Nm +to serve NFSv4, you must also: +.sp +.Bl -bullet -compact +.It +Add a +.Dq V4: +line to +.Xr exports 5 . +(This is needed as well as either the ZFS sharenfs property +or an exports line for each exported file system.) +.It +Either choose to do uids in +.Dq strings , +which is probably +the easiest unless you are doing +.Xr kerberos 7 +mounts or +run +.Xr nfsuserd 8 +.Pq choose one, not both of these . +Setting the sysctls MIBs +.Va vfs.nfs.enable_uidtostring +and +.Va vfs.nfsd.enable_stringtouid +to one and not running the nfsuserd chooses uids in +.Dq strings . +.It +Set +.Bd +nfsv4_server_enable="YES" +.Ed +in +.Xr rc.conf 5 +or set +.Bd +nfsv4_server_only="YES" +.Ed +in +.Xr rc.conf 5 +if you do not want NFSv3 to be served. +.El +.sp +.Pp When .Nm is run in an appropriately configured vnet jail, the server is restricted @@ -336,7 +392,9 @@ just do a .Xr pnfs 4 , .Xr pnfsserver 4 , .Xr exports 5 , +.Xr rc.conf 5 , .Xr stablerestart 5 , +.Xr kerberos 7 , .Xr gssd 8 , .Xr ipfw 8 , .Xr jail 8 ,
