Bug 249600 - Cannot disable nfsv4 protocol on Linux nfs servers
Summary: Cannot disable nfsv4 protocol on Linux nfs servers
Keywords:
Status: CLOSED DUPLICATE of bug 441983
Alias: None
Product: Fedora
Classification: Fedora
Component: nfs-utils
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-25 17:57 UTC by Brendan Lynch
Modified: 2008-04-28 17:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-28 17:34:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brendan Lynch 2007-07-25 17:57:22 UTC
Description of problem:

Cannot disable nfsv4 on nfs servers running Fedora 7 (or RHEL 5)

According to documentation, you can disable a particular protocol in NFS by
adding the "-N" or "--no-nfs-version" flag to nfsd.  This is normally done by
adding the appropriate option to the definition of RPCNFSDARGS in
/etc/sysconfig/nfs.

This used to work in FC5 and RHE4; however in current versions (F7 and RHE5) the
argument, while accepted, seems to have not effect for NFS Version 4 protocol.

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

kernel-2.6.22.1-27.fc7
nfs-utils-1.0.12-4.fc7

How reproducible:


Steps to Reproduce:
1.

Edit /etc/sysconfig/nfs to contain the following definitions:

RPCMOUNTDOPTS="--no-nfs-version 4"
RPCNFSDARGS="--no-nfs-version 4"

2.

Edit /etc/exports to share an existing directory:

/myfs        *(rw)

3.

Start or restart nfsd service:

service nfs restart

4. Check to see what nfs versions are exported by performing an "rpcinfo -p"
  
Actual results:

rpcinfo -p shows nfs v4 protocols for "nfs" being advertised, as well as other
versions:

   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100000    4     0    111  portmapper
    100000    3     0    111  portmapper
    100000    2     0    111  portmapper
    100024    1   udp    981  status
    100024    1   tcp    984  status
    100007    2   udp    708  ypbind
    100007    1   udp    708  ypbind
    100007    2   tcp    711  ypbind
    100007    1   tcp    711  ypbind
    100011    1   udp    898  rquotad
    100011    2   udp    898  rquotad
    100011    1   tcp    901  rquotad
    100011    2   tcp    901  rquotad
    100021    1   udp  32768  nlockmgr
    100021    3   udp  32768  nlockmgr
    100021    4   udp  32768  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100021    1   tcp  41667  nlockmgr
    100021    3   tcp  41667  nlockmgr
    100021    4   tcp  41667  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp    934  mountd
    100005    1   tcp    937  mountd
    100005    2   udp    934  mountd
    100005    2   tcp    937  mountd
    100005    3   udp    934  mountd
    100005    3   tcp    937  mountd

Also, "ps" shows an nfsv4 daemon in use:

$ ps -ef | grep nfs
root      2440     2  0 12:37 ?        00:00:00 [nfsd4]
root      2444     2  0 12:37 ?        00:00:00 [nfsd]
root      2445     2  0 12:37 ?        00:00:00 [nfsd]
root      2446     2  0 12:37 ?        00:00:00 [nfsd]
root      2447     2  0 12:37 ?        00:00:00 [nfsd]
root      2448     2  0 12:37 ?        00:00:00 [nfsd]
root      2449     2  0 12:37 ?        00:00:00 [nfsd]
root      2450     2  0 12:37 ?        00:00:00 [nfsd]
root      2451     2  0 12:37 ?        00:00:00 [nfsd]
root      2454     1  0 12:37 ?        00:00:00 rpc.mountd --no-nfs-version 4




Expected results:

On rhe4 with the same configuration,  "rpcinfo -p" shows no v4 protocols:

   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  32768  status
    100024    1   tcp  32768  status
    100007    2   udp    626  ypbind
    100007    1   udp    626  ypbind
    100007    2   tcp    629  ypbind
    100007    1   tcp    629  ypbind
    100021    1   udp  32770  nlockmgr
    100021    3   udp  32770  nlockmgr
    100021    4   udp  32770  nlockmgr
    100021    1   tcp  32806  nlockmgr
    100021    3   tcp  32806  nlockmgr
    100021    4   tcp  32806  nlockmgr
    100011    1   udp    834  rquotad
    100011    2   udp    834  rquotad
    100011    1   tcp    837  rquotad
    100011    2   tcp    837  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp    936  mountd
    100005    1   tcp    939  mountd
    100005    2   udp    936  mountd
    100005    2   tcp    939  mountd
    100005    3   udp    936  mountd
    100005    3   tcp    939  mountd

and ps shows no nfsd4 daemon:

$ ps -ef | grep nfs
root     26607     1  0 Jul13 ?        00:00:00 [nfsd]
root     26608     1  0 Jul13 ?        00:00:00 [nfsd]
root     26609     1  0 Jul13 ?        00:00:00 [nfsd]
root     26610     1  0 Jul13 ?        00:00:00 [nfsd]
root     26611     1  0 Jul13 ?        00:00:00 [nfsd]
root     26612     1  0 Jul13 ?        00:00:00 [nfsd]
root     26613     1  0 Jul13 ?        00:00:00 [nfsd]
root     26614     1  0 Jul13 ?        00:00:00 [nfsd]
root     26642     1  0 Jul13 ?        00:00:00 rpc.mountd --no-nfs-version 4


Additional info:

This causes major problems for interoperability between Linux and Solaris
systems with different uid to username mappings, as it is not possible to tell
Linux servers not to advertise v4 protocols and hence to encourage later Solaris
clients to use v4 protocols.

This may well be an upstream bug; but I have not had the chance to try it on
other Linux distros.  Also not clear without further investigation whether this
is an nfs-utils or kernel (nfsd kernel module) bug.

Comment 1 Tomasz Kepczynski 2007-08-17 07:44:50 UTC
I have similar but not identical problem on fc6.
I have
RPCNFSDARGS='--no-nfs-version 4'
in /etc/sysconfig/nfs.
After a reboot server comes up with nfs version 2, 3 & 4 enabled
(as shown by rpcinfo -p and problems I have with autofs).
Then I issue:
service nfs restart
and after that I only have nfs version 2 & 3.
I use:
kernel-2.6.22.1-32.fc6
nfs-utils-1.0.10-14.fc6


Comment 2 Steve Dickson 2007-08-20 14:12:49 UTC
Setting the RPCMOUNTDOPTS="--no-nfs-version 4" is not needed
since mountd is not used with v4.

Also update to the latest nfs-util package, 1.1.0-3. That
seem to fix this problem from. 

Comment 3 Brendan Lynch 2008-04-28 17:34:10 UTC
I do not believe that 1.1.0-3 fixes the problem, as it still occurs (first time
after boot) on Fedora 8, running 1.1.0-6.  I filed a second bug report when we
found the real issue (I did not realize this one was still open!)  The new bug
report is 441983 .  The report for this bug also explains Tomasz's symptoms
reported above.


*** This bug has been marked as a duplicate of 441983 ***


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