Red Hat Bugzilla – Bug 155392
can't change nfs options with a remount
Last modified: 2007-11-30 17:07:07 EST
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):
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.
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.
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?
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