Re: [RFC] Making mount_nfs to attempt NFSv4 before NFSv3 and NFSv2?

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Tue, 04 Jan 2022 03:18:36 UTC
Konstantin Belousov wrote:
[good stuff snipped]
> The v4 NFS is very different from v3, it is not an upgrade, it is rather
> a different network filesystem with some (significant) similarities to v3.
>
> That said, it should be fine changing the defaults, but you need to ensure
> that reasonable scenarios, like the changed FreeBSD client mounting
> from v3-only server, still work correctly.  The change should be made in a
> way that only affects client that connects to the server that has both
> v4 and v3.
A particular test case that needs to be done is the diskless NFS root fs.
This case must use NFSv3 and if it is not the default, it might break?
I am not really set up to test this at this time.
(There are assorted reasons that NFSv4 does not, or at least might not,
 work for a diskless root fs, but that is a separate topic.)

Other than testing diskless NFS root file systems, I do not have a
strong opinion w.r.t. whether the default should change.

If the default stays as NFSv3, a fallback to NFSv4 could be done, which
would handle the NFSv4 only server case. (No one uses NFSv2 any more,
so the fallback to NFSv2 is almost irrelevant, imho.)

rick