TIL - NFS UDP Support

TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post

Today I was trying to bring up an really old board (v2.6.32 kernel) that used to mount its root filesystem via NFS. Unfortunately, I have to stick to this configuration for a few reasons.

The virtual machine that came with the board did not start anymore, so I had to setup a new one.

Playing with such old stuff is not fun at all. Really. You struggle with such energy draining tasks like find old toolchains, add support for diffie-hellman-group1-sha1 to get SSH to work, and wierd NFS configurations to make it compatible.

Anyway.

One thing I was struggle with for a while was this error:

Root-NFS: Unable to get nfsd port number from server, using default

It turned out that that the kernel tries to communicate with the NFS server via UDP, which is disabled by default since v5.5 by the CONFIG_NFS_DISABLE_UDP_SUPPORT configuration option:

config NFS_DISABLE_UDP_SUPPORT
       bool "NFS: Disable NFS UDP protocol support"
       depends on NFS_FS
       default y
       help
     Choose Y here to disable the use of NFS over UDP. NFS over UDP
     on modern networks (1Gb+) can lead to data corruption caused by
     fragmentation during high loads.

As it is set by default, I had to find a distribution that used a kernel older than v5.5 for my virtual machine, unless I do not want to compile the kernel myself - which I don't. You can tell the kernel to mount NFS via TCP by kernel command line options, but I was not allowed to change it.

This is not fun.

/media/old-waste.png