[SOLVED] NFSv4 server disabled under PVE 8?

meyergru

Member
Jan 28, 2023
85
32
18
www.congenio.de
I just upgraded to Proxmox 8 and found that my NFS shares are not available via NFSv4 any more, only via NFSv3.

Clients get a "protocol not supported" error when they try to mount via nfs4 protocol. Also, I can see:

Code:
#cat /proc/fs/nfsd/versions
+3 -4 -4.0 -4.1 -4.2

I found that in /etc/default/nfs-kernel-server, there is now:

Code:
RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4"

Under PVE 7, this was:

Code:
RPCMOUNTDOPTS="--manage-gids"

However, removing the '--no-nfs-version 4' and rebooting does not help. With a plain Debian Bookworm install, NFSv4 works right out of the box.
I found that in /etc/nfs.conf.d/local.conf, there is also:

Code:
[mountd]
manage-gids = 1

[nfsd]
vers4 = n
threads = 16

# Modified: Modified by nfsconf on Jun 29 2023 08:56:37

Obviously this happened during upgrade.

So, why was NFSv4 deliberately removed in the first place?
 
Hi,
please note that the nfs-kernel-server package is not directly part of Proxmox VE, but provided by Debian. I just checked a node with the package I upgraded from 7 to 8 during testing and it does not include the --no-nfs-version 4 part. I also don't have a /etc/nfs.conf.d/local.conf. Same on a freshly installed Proxmox VE 8 node after installing the package.

The configuration files mentions that it was modified by nfsconf. Can you correlate the timestamp? Could it be that some other package during upgrade or script invoked that?
 
As I said, the timestamp is that of my 7 -> 8 upgrade. Obviously some upgrade script called nfsconf and created /etc/nfs.conf.d/local.conf

I did not modify those entries myself and before the upgrade, everything worked with NFSv4.
 
With apt changelog nfs-common (also provided by Debian) I found
Code:
nfs-utils (1:2.6.1-1) unstable; urgency=medium

  [ Ben Hutchings ]
  * Delete obsolete README.Debian.nfsv4
  * nfs-common: Remove obsolete upgrade logic from postinst
  * nfs-common: Do not remove statoverride of mount.nfs on upgrade
  * nfs-common: Convert /etc/default/nfs-* into /etc/nfs.conf.d/local.conf on
    upgrade
Do you still have a backup from before the upgrade and can check what the files /etc/default/nfs-* contained?
 
Interesting. In nfs-kernel-server, there was '--no-nfs-version 4', but I am quite sure I have not modified it myself. Also, NFSv4 worked with PVE 7 with that setting. The directory /etc/nfs.cond.d and /etc/nfs.conf did not exist there.

Seems that somehow this settings crept in but never had an effect until now where nfsconf copied them to /etc/nfs.conf.d/local.conf
 
Ah, and now I see this:

Code:
nfs-utils (1:2.6.1-1) unstable; urgency=medium

  On systems running systemd, changes to command-line options in
  /etc/default/nfs-common or /etc/default/nfs-kernel-server will now
  be ignored.  All those options can instead be set in /etc/nfs.conf
  or /etc/nfs.conf.d/; see nfs.conf(5).

  If either of the files in /etc/default has been changed, the
  command-line options will be converted on upgrade to the file
  /etc/nfs.conf.d/local.conf.

  A future update to nfs-utils will remove the command-line options
  in /etc/default entirely, so even on systems not using systemd
  you should make changes in /etc/nfs.conf.d/ instead.

 -- Ben Hutchings <benh@debian.org>  Sun, 13 Mar 2022 19:55:09 +0100
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!