Symptoms
NFS server inside a Container does not work (faced in CentOS 8 and Almalinux 8 Containers, but can affect other Containers as well), the following error occurs:
systemctl status nfs-mountd.service Unable to watch /proc/fs/nfsd/clients: No such file or directory
Cause
According to https://man7.org/linux/man-pages/man8/nfsdclnts.8.html there is /proc/fs/nfsd/clients introduced in kernel 5.3 and VHS7 does not provide this file to userspace in the current kernel version.
The nfs-utils userspace has been already fixed to fall back working without this file. But nfs-utils versions:
- nfs-utils-2.3.3-47.el8
- nfs-utils-2.3.3-50.el8
- nfs-utils-2.3.3-51.el8
do not have those fixes yet and thus make nfs-mountd service failing.
Resolution
Fixes will get into nfs-utils packages in future releases. Currently the one of the following workaround can be applied:
- Downgrade nfs-utils to nfs-utils-2.3.3-46.el8 version
- Manually build nfs-utils from sources and install it in affected Containers https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary