@@ -8,8 +8,9 @@ To mount an NFS share, start by installing the `nfs-utils` and `sv-netmount`
88packages.
99
1010Before mounting an NFS share, [ enable] ( ./services/index.md#enabling-services )
11- the ` statd ` , ` rpcbind ` , and ` netmount ` services. If the server supports ` nfs4 ` ,
12- the ` statd ` service isn't necessary.
11+ the ` statd ` , ` rpcbind ` , and ` netmount ` services. Both ` statd ` and ` rpcbind `
12+ services are only needed for NFSv3, so if you mount shares on your clients like
13+ that, keep them. For NFSv4 shares, ` netmount ` is enough.
1314
1415To mount an NFS share:
1516
@@ -69,3 +70,39 @@ server status:
6970
7071You can use [ nfs.conf(5)] ( https://man.voidlinux.org/nfs.conf.5 ) to configure
7172your server.
73+
74+ ### Setting up a server (NFSv4-only, Kerberos disabled)
75+
76+ If you don't plan on using NFSv3 even as a fallback option, you can set up an
77+ NFSv4-only server. This will let you eliminate the need for
78+ [ enabling] ( ./services/index.md#enabling-services ) ` statd ` and ` rpcbind `
79+ services, be it on server or client side.
80+
81+ First, install ` nfs-utils ` and follow the instructions about ` /etc/exports `
82+ listed above.
83+
84+ Then, edit ` /etc/nfs.conf ` and disable version 3, as in:
85+
86+ ```
87+ [nfsd]
88+ vers3=n
89+ vers4=y
90+ vers4.1=y
91+ vers4.2=y
92+ ```
93+
94+ To verify which versions are enabled or disabled, run:
95+
96+ ```
97+ # cat /proc/fs/nfsd/versions
98+ ```
99+
100+ As the last step, set ` NFSV4_ONLY ` to a non-empty value in
101+ ` /etc/sv/nfs-server/conf `
102+
103+ ```
104+ NFSV4_ONLY=true
105+ ```
106+
107+ Now you can [ enable] ( ./services/index.md#enabling-services ) ` nfs-server `
108+ service.
0 commit comments