Bug 155392 - can't change nfs options with a remount
can't change nfs options with a remount
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: mount (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Brian Brock
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-04-19 17:30 EDT by Damian Menscher
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-20 03:30:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Damian Menscher 2005-04-19 17:30:33 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)

Description of problem:
If you want to change, for example, the retrans option for an NFS-mounted filesystem, simply doing
mount -o remount,retrans=10 /mountpoint
doesn't work.  It will change your /etc/mtab, but packet sniffing proves it hasn't actually changed the number of retransmits.  Similarly, it won't change from UDP to TCP.

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

How reproducible:

Steps to Reproduce:
1. Mount an NFS filesystem (I only tested with soft mounts on UDP)
2. Try changing retrans from default of 3
3. Compare /etc/mtab to a packet capture on a lossy network

Actual Results:  It stays at the old values, despite /etc/mtab claiming the change was successful.

Additional info:
Comment 1 Karel Zak 2005-04-20 03:30:20 EDT
NFS FAQ (http://nfs.sourceforge.net):

  D11. Why doesn't "mount -oremount,tcp" convert an NFS-mounted file system
mounted with UDP to one mounted with TCP?

    A. The "remount" option on the mount command only affects the generic mount
options, such as ro/rw, sync, and so on (see man mount for a complete list of
generic mount command options). The NFS-specific mount options listed on the nfs
man page can't be changed with a "mount -oremount" style mount command. You must
unmount your file system and mount it again with new options in order to modify
the NFS-specific settings.

    Note that the mount command may update the contents of /etc/mtab whether or
not the actual mount settings have changed in the kernel. So when you try mount
-oremount with an NFS-specific mount option, subsequent mount commands may
report that the setting is in effect. This is only because the mount command is
reading /etc/mtab. The /proc/mounts file reflects the true mount options that
the kernel is using.
Comment 2 Damian Menscher 2005-04-20 03:38:32 EDT
Perhaps I should have listed this as an RFE, not a bug.  I can't think of any
reason why certain NFS options (such as the retrans limit) couldn't be changed
on the fly without requiring a umount (though others, such as udp->tcp very well
might require a umount first).  Would it be better for me to file the RFE upstream?
Comment 3 Karel Zak 2005-04-20 04:14:12 EDT
The mount command parses remount options and calls mount(2) syscall only. It
means it's linux kernel who ignore your options. I have doubts about any
possible change, but you can ask kernel/nfs upstream. There's an example NFS
mailing list at sourceforge.net: http://lists.sourceforge.net/lists/listinfo/nfs

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