Red Hat Bugzilla – Bug 1547506
Incorrect NFS version string reported for NFSv4.2 mounts
Last modified: 2018-05-01 22:30:25 EDT
Description of problem: With RHEL 7.4 NFS server/client mounting NFSv4.2 mount using something like this in /etc/fstab: 192.168.122.1:/srv /srv nfs4 nfsvers=4.2 0 0 We see: # mount -t nfs4 192.168.122.1:/srv on /srv type nfs4 (...,vers=4.1,...) Justin Mitchell noticed: " It looks like the last working version was nfs-utils-1.3.0-43 between there and -46 the version string gets modified. Supplying nfsvers=4.2 on the command line gives a reported string of: -43 vers=4.2 -44 vers=4 -46 vers=4.1 It also looks like this does not happen upstream, it is confined to the RHEL specific patches, probably where we tried to change the default version it tries. " Version-Release number of selected component (if applicable): nfs-utils-1.3.0-0.48.el7_4.1.x86_64
It appears this patch is needed commit 1e3ca7fe199531a372bb8e1c1033d8973097be50 Author: NeilBrown <neilb@suse.com> Date: Wed Jul 26 13:47:42 2017 -0400 mount: move handling of "-t nfs4" into nfs_nfs_version()
I would note that this is something that should ahve been caught by testing, so we need to improve our QE tests in this area to include checking the nfs version is as requested I think.
(In reply to Steve Whitehouse from comment #6) > I would note that this is something that should ahve been caught by testing, > so we need to improve our QE tests in this area to include checking the nfs > version is as requested I think. Thanks for the heads up! We'll improve our testcase. ------------------------------- [root@~]# tail -n 2 /etc/fstab 127.0.0.1:/export_test /mnt/1 nfs vers=4.2 0 0 127.0.0.1:/export_test /mnt/2 nfs4 vers=4.2 0 0 [root@~]# mount -a [root@~]# nfsstat -m /mnt/1 from 127.0.0.1:/export_test Flags: rw,relatime,vers=4.2, ... /mnt/2 from 127.0.0.1:/export_test Flags: rw,relatime,vers=4.1, ... [root@~]# ------------------------------- It turns out the keyword "nfs4" in /etc/keytab can perform differently. Previously we only test the former configure.
(In reply to Yongcheng Yang from comment #7) [...] > It turns out the keyword "nfs4" in /etc/keytab can perform > differently. "s/keytab/fstab" sorry for the typo.
(In reply to Yongcheng Yang from comment #7) > It turns out the keyword "nfs4" in /etc/fstab can perform > differently. Previously we only test the former configure. FWIW, using nfs4 is needed when creating minimal NFSv4-only setup; see https://access.redhat.com/solutions/3320581 Thanks.
Thanks, I'm happy to confirm nfs-utils-1.3.0-0.54.el7 fixes the issue!
Moving to VERIFIED according to comment #12.
Steve, For the purpose of the erratum, is the following description correct? > Previously, the mount.nfs utility reported version 4.1 when an NFS share was > mounted using NFS version 4.2. With this update, the version handling has been > fixed, and mount.nfs now reports version 4.2 correctly. Thanks!
JFYI. The previous problem is that specifying "-t nfs4" causes other mount options ("vers=" and "nfsvers=" especially) to be ignored. As a result, when handling "-t nfs4 -o vers=4.2", the default NFSv4 version will be negotiated (that would be 4.1) but not the given version 4.2. However, let's wait SteveD for better summary. Please find the following upstream commit description. (In reply to Steve Dickson from comment #2) > It appears this patch is needed > > commit 1e3ca7fe199531a372bb8e1c1033d8973097be50 > Author: NeilBrown <neilb@suse.com> > Date: Wed Jul 26 13:47:42 2017 -0400 > > mount: move handling of "-t nfs4" into nfs_nfs_version() Current "-t nfs4" causes other mount options to be ignored and an NFSv4 version to be negotiated. This is even true when "-o vers=4.1" is given. To address this, we need to move the handled of "-t nfs4" into nfs_nfs_version, which means passing in the filesystem type.
Yongcheng, thanks for the clarification. I'm changing the description to: > Previously, the mount.nfs utility ignored other NFS version options, such > as "-o vers=4.2", when the "-t nfs4" option was specified. As a consequence, > the mount.nfs utility set NFS version to 4.1, which is the default NFSv4 > version, even if other options required a different minor version. With this > update, NFS version handling has been improved, and the described problem no > longer occurs.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0981
*** Bug 1573124 has been marked as a duplicate of this bug. ***