How to activate NFS server protocol v4 on Ubuntu 20.04 / Armbian 21.08

433 Views Asked by At

I just installed Armbian on my SBC running Ubuntu 20.04.3 LTS (Focal Fossa). Output of cat /etc/os-release is:

NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
PRETTY_NAME="Armbian 21.08.2 Focal"
VERSION_ID="20.04"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I installed NFS server via apt-get install nfs-kernel-server. I wanted to share my LVM2 volume, but before checked which version of NFS is supported.

Output of cat /proc/fs/nfsd/versions is:

-2 +3

Output of rpcinfo -u localhost nfs is:

program 100003 version 3 ready and waiting

Output of rpcinfo -p | grep nfs is:

program vers proto   port  service
100003    3   tcp   2049  nfs
100003    3   udp   2049  nfs

All three indicate that my NFS server is not supporting NFS v4 which wonders me since I have a recent kernel version and a recent OS version.

What bothers me is the output of zcat /proc/config.gz | grep NFS:

# CONFIG_USB_FUNCTIONFS is not set
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_KERNFS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V2=m
CONFIG_NFS_V3=m
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=m
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y

Questions:

Could CONFIG_NFSD_V4 is not set be the reason why NFS v4 is not working?

And how to activate NFS server protocol v4 on Ubuntu 20.04 / Armbian 21.08 then?

1

There are 1 best solutions below

0
On BEST ANSWER

In the Armbian community I found a post which answered my question.

Even after installing NFS via apt-get install nfs-kernel-server it only installs the user-space support.

This is the original package info from https://packages.debian.org/sid/nfs-kernel-server:

This package contains the user-space support needed to use the NFS kernel server.

That means what NFS version is supported depends on the kernel on compile time. And even NFSv4 and above is over 10 years only it can be activated/deactivated in the so called kernel config which looks like:

# CONFIG_USB_FUNCTIONFS is not set
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_KERNFS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V2=m
CONFIG_NFS_V3=m
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=m
# CONFIG_NFS_SWAP is not set
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFS_DISABLE_UDP_SUPPORT=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y

The armbian community told me that it is currently deactivated for certain boards. This has no specific reason and could easily be activated if some in the community would change the kernel config.