This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 547718 - mount.nfs should have mountproto=tcp as default
mount.nfs should have mountproto=tcp as default
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-15 09:35 EST by Terje Røsten
Modified: 2010-10-28 18:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: nfs-utils-1.2.1-6.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-28 18:16:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Terje Røsten 2009-12-15 09:35:56 EST
Since upgrading to Fedora 12 I see very slow nfs mounts.

This is fixed by adding mountproto=tcp option.

As tcp is now the default transport for nfs I don't see why udp
is default mountproto.

This should be fix by a patch to set tcp as default. 
It's likely to be useful for upstream too.
Comment 1 Steve Dickson 2009-12-16 11:48:13 EST
Well the reason mount tries UDP first and then TCP is, TCP connects
going into an unusable state (TIMEWAIT) when they are closed which
also ties up the port that the connection was made on. 

During an autofs mount storm (a nfs client doing thousands of mounts
simultaneously when booting) network port become very needed 
quantity... So the idea is to save ports by talking to the
remote mountd over udp which does not tie up ports in an unusable
state. 

Now if the server does not support UPD then yes, setting mountproto=tcp
will make things go faster but you will be using up more network ports.

I hope this is clear...
Comment 2 Terje Røsten 2009-12-16 19:38:13 EST
I don't really understand your argumen. Autofs is not useable at all as
30-60 seconds wait to mount $HOME is not acceptable.

So to prevent a corner case autofs mount storm everybody has to wait a minute
to get their $HOME ready? Don't make sense to me, however it's middle of the night here now...
Comment 3 Steve Dickson 2009-12-17 14:22:04 EST
No... An assumption is made that most server offer the 
mounting service (i.e. rpc.mountd) on both the UDP and
TCP transport... If the server only offers the mounting 
service on the TCP transport then mounts will hang a bit...

Please post the output of 'rpcinfo -p <nfs_server>' to
see what the server is offering...
Comment 4 Jeff Layton 2009-12-17 14:43:36 EST
I wouldn't think it would hang in that case...

The client should notice that rpcbind isn't advertising MNT over UDP and just use TCP instead, right? I suspect that the problem is more likely to be that the server is advertising a UDP MNT service, but something is filtering out the traffic.
Comment 5 Terje Røsten 2009-12-17 17:06:11 EST
I believe you are right, if I do mountproto=upd it fails, however rpcinfo
shows upd for mountd I think. Have to doublecheck tomorrow.
 
Btw the host is running sun cluster, a dual hosts config. I might
recall a similar? issue on multi homed hosts some time ago, forgot the
bz #.
Comment 6 Terje Røsten 2009-12-18 03:43:24 EST
Some logs:

$ mount -vvv -t nfs -o mountproto=udp server:/export/home/terjeros /mnt/nfs
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "server:/export/home/terjeros"
mount: node:  "/mnt/nfs"
mount: types: "nfs"
mount: opts:  "mountproto=udp"
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "server:/export/home/terjeros"
mount: external mount: argv[2] = "/mnt/nfs"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,mountproto=udp"
mount.nfs: timeout set for Fri Dec 18 09:28:01 2009
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 1.2.3.4 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: portmap query failed: RPC: Timed out
mount.nfs: mount to NFS server 'server:/export/home/terjeros' failed: timed out, giving up

$ rpcinfo -p server
   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
1073741824    1   tcp  32773
    100229    1   tcp  32781
    100229    2   tcp  32781
    100242    1   tcp  32782
    100230    1   tcp  32783
    100001    2   udp  32821  rstatd
    100001    3   udp  32821  rstatd
    100001    4   udp  32821  rstatd
    100011    1   udp  32824  rquotad
    100145    1   tcp  32784
    100533    1   tcp  32785
    100281    1   tcp  32786
 805306372    1   udp  32861
 536873113    1   tcp  32794
    100142    2   tcp  32795
    100248    2   tcp  32796
    100141    1   tcp  32803
    300215    1   udp  32877
    100024    1   udp  32970  status
    100024    1   tcp  32895  status
    100133    1   udp  32970
    100133    1   tcp  32895
    100021    1   udp   4045  nlockmgr
    100021    2   udp   4045  nlockmgr
    100021    3   udp   4045  nlockmgr
    100021    4   udp   4045  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100227    2   udp   2049  nfs_acl
    100227    3   udp   2049  nfs_acl
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100227    2   tcp   2049  nfs_acl
    100227    3   tcp   2049  nfs_acl
    100021    1   tcp   4045  nlockmgr
    100021    2   tcp   4045  nlockmgr
    100021    3   tcp   4045  nlockmgr
    100021    4   tcp   4045  nlockmgr
    100005    1   udp  36243  mountd
    100005    1   tcp  56545  mountd
    100005    2   udp  36243  mountd
    100005    2   tcp  56545  mountd
    100005    3   udp  36243  mountd
    100005    3   tcp  56545  mountd
    100007    3   udp  36341  ypbind
    100007    2   udp  36341  ypbind
    100007    1   udp  36341  ypbind
    100007    3   tcp  56562  ypbind
    100007    2   tcp  56562  ypbind
    100007    1   tcp  56562  ypbind
  22222222    1   udp  55209
  22222222    1   tcp   5002

 
My initial report was wrong, the problem is mountproto=udp don't work?
Comment 7 Steve Dickson 2010-10-20 10:51:47 EDT
I was not able to reproduce this error with the 
latest nfs-utils release:
     https://admin.fedoraproject.org/updates/nfs-utils-1.2.1-6.fc12

Please download this new version to see it it solves this problem.
Comment 8 Terje Røsten 2010-10-20 11:46:24 EDT
This version works fine, thanks! The ticket can be closed.
Comment 9 Fedora Update System 2010-10-20 11:59:24 EDT
nfs-utils-1.2.1-6.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/nfs-utils-1.2.1-6.fc12
Comment 10 Steve Dickson 2010-10-20 11:59:59 EDT
Thank you testing the new version!
Comment 11 Fedora Update System 2010-10-21 01:58:50 EDT
nfs-utils-1.2.1-6.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nfs-utils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nfs-utils-1.2.1-6.fc12
Comment 12 Fedora Update System 2010-10-28 18:16:14 EDT
nfs-utils-1.2.1-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

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