RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1363737 - man mount.nfs incorrectly mentions the default mount version as nfs version 3 or 2
Summary: man mount.nfs incorrectly mentions the default mount version as nfs version 3...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.2
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 7.3
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-03 13:03 UTC by Ameya Sathe
Modified: 2016-11-04 05:04 UTC (History)
1 user (show)

Fixed In Version: nfs-utils-1.3.0-0.32.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 05:04:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2383 0 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2016-11-03 13:53:02 UTC

Description Ameya Sathe 2016-08-03 13:03:43 UTC
Description of problem:
Quoting from 'man mount.nfs':
"mount.nfs is used to mount NFS file systems versions 3 or 2"

But, 
mount.nfs  nfsserver.example.com:/nfsshare  /abc  -v 
gives the following output

mount.nfs  nfsserver.example.com:/nfsshare  /abc -v
mount.nfs: timeout set for Wed Aug  3 12:43:57 2016
mount.nfs: trying text-based options 'vers=4,addr=10.7.241.211,clientaddr=10.27.119.29'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting nfsserver.example.com:/nfsshare

Version-Release number of selected component (if applicable):

nfs-utils-1.3.0-0.21.el7_2.1.x86_64

How reproducible:


Steps to Reproduce:
1. On  Red Hat Enterprise Linux Server release 7.2 (Maipo), install nfs-utils-1.3.0-0.21.el7_2.1.x86_64 and tag it as your NFS server.


2.  Configure a nfs share with any export version

 cat  /etc/exports.d/myshare.exports
/myshare 10.65.202.216/24(rw)

3. On  Red Hat Enterprise Linux Server release 7.2 (Maipo), install nfs-utils-1.3.0-0.21.el7_2.1.x86_64 and tag it as your NFS client.

4.  Execute the mount.nfs command in verbose mode on the NFS client to mount the NFS share.

5.  The mount.nfs command uses nfs version 4 to mount the nfs share, instead of using version 2 or 3 as specified in the manual page of mount.nfs

Actual results:

mount.nfs  10.65.202.237:/myshare /mnt/nfsexport/ -v
mount.nfs: timeout set for Wed Aug  3 18:22:29 2016
mount.nfs: trying text-based options 'vers=4,addr=10.65.202.237,clientaddr=10.65.202.216'
10.65.202.237:/myshare on /mnt/nfsexport type nfs


Expected results:

mount.nfs  10.65.202.237:/myshare /mnt/nfsexport/ -v
mount.nfs: timeout set for Wed Aug  3 18:22:29 2016
mount.nfs: trying text-based options 'vers=3,addr=10.65.202.237,clientaddr=10.65.202.216'
10.65.202.237:/myshare on /mnt/nfsexport type nfs

Additional info:

If the NFS server is not supporting the version 4 but only version 3; then the mount.nfs gives following error:
mount.nfs: timeout set for Wed Aug  3 13:00:28 2016
mount.nfs: trying text-based options 'vers=4,addr=10.65.202.237,clientaddr=10.65.202.216'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 10.65.202.237:/myshare

Comment 1 Steve Dickson 2016-08-03 14:20:26 UTC
(In reply to Ameya Sathe from comment #0)
> Description of problem:
> Quoting from 'man mount.nfs':
> "mount.nfs is used to mount NFS file systems versions 3 or 2"
>

I don't see the problem here.... because the man page also says 
"mount.nfs4 is used for mounting NFSv4 file system" which
is the case.

Comment 3 Yongcheng Yang 2016-08-04 09:42:20 UTC
(In reply to Ameya Sathe from comment #0)
> Description of problem:
> Quoting from 'man mount.nfs':
> "mount.nfs is used to mount NFS file systems versions 3 or 2"
> 
> But, 
> mount.nfs  nfsserver.example.com:/nfsshare  /abc  -v 
> gives the following output
> 
> mount.nfs  nfsserver.example.com:/nfsshare  /abc -v
> mount.nfs: timeout set for Wed Aug  3 12:43:57 2016
> mount.nfs: trying text-based options
> 'vers=4,addr=10.7.241.211,clientaddr=10.27.119.29'
> mount.nfs: mount(2): Permission denied
> mount.nfs: access denied by server while mounting
> nfsserver.example.com:/nfsshare
> 

Maybe we need to import the upstream patch:

commit d1f6583a5ff32711a1da1d4a13a29a5700f63504
Author: Ben Hutchings <ben.uk>
Date:   Thu Apr 2 11:43:33 2015 -0400

    mount.nfs.man, nfs.man: Update distinction between fstypes
    
    From: Ben Hutchings <ben.uk>
    
    this is a resync of the man page updates in the Debian
    package with mainline nfs-utils.
    
    Acked-By: J. Bruce Fields <bfields>
    Signed-off-by: Steve Dickson <steved>

And then the mount.nfs(8) will look like:
"Under Linux 2.6.32 and later kernel versions, mount.nfs can mount all NFS file system versions.  Under earlier Linux kernel versions, mount.nfs4 must be used for mounting NFSv4 file systems while mount.nfs must be used for NFSv3 and v2."

Comment 6 Yongcheng Yang 2016-08-08 08:01:58 UTC
Have checked the man page is updated as expected.
Move this bug on to VERIFIED.

[root@ibm-x3250m4-07 ~]# rpm -Uvh nfs-utils-1.3.0-0.32.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:nfs-utils-1:1.3.0-0.32.el7       ################################# [ 50%]
Cleaning up / removing...
   2:nfs-utils-1:1.3.0-0.31.el7       ################################# [100%]
[root@ibm-x3250m4-07 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.32.el7.x86_64
[root@ibm-x3250m4-07 ~]# man mount.nfs | col -b 
MOUNT.NFS(8)						    System Manager's Manual						  MOUNT.NFS(8)



NAME
       mount.nfs, mount.nfs4 - mount a Network File System

SYNOPSIS
       mount.nfs remotetarget dir [-rvVwfnsh ] [-o options]

DESCRIPTION
       mount.nfs is a part of nfs(5) utilities package, which provides NFS client functionality.

       mount.nfs  is  meant to be used by the mount(8) command for mounting NFS shares. This subcommand, however, can also be used as a stand‐
       alone command with limited functionality.

       remotetarget is a server share usually in the form of servername:/path/to/share.	 dir is the directory on which the file system	is  to
       be mounted.

       Under  Linux  2.6.32 and later kernel versions, mount.nfs can mount all NFS file system versions.  Under earlier Linux kernel versions,
       mount.nfs4 must be used for mounting NFSv4 file systems while mount.nfs must be used for NFSv3 and v2.

[snip...]

Comment 8 errata-xmlrpc 2016-11-04 05:04:20 UTC
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://rhn.redhat.com/errata/RHBA-2016-2383.html


Note You need to log in before you can comment on or make changes to this bug.