Bug 243875

Summary: NFS option confusion when mounting same share multiple times
Product: [Fedora] Fedora Reporter: Mike McGrath <mmcgrath>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 6CC: davej
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-20 11:49:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mike McGrath 2007-06-12 10:47:40 EDT
Description of problem:

When mounting the same share in two different locations on a local machine, 
with different mount options.  The one mounted first overwrites the options of 
the second.

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

How reproducible:
Every time

Steps to Reproduce:
in fstab:
myserver:/vol/fedora/build/koji       /mnt/koji       nfs     ro,defaults     
0 0
myserver:/vol/fedora/build/koji       /mashroot/mnt/koji      nfs     
rw,defaults     0 0
Actual results:
/mnt/koji and /mashroot/mnt/koji/ are both mounted ro.  Also when running 
a 'mount' it appears the mount is mounted rw but it is a ro mount.  The 
reverse is also true if /mashroot/mnt/koji/ is mounted first.  

Expected results:
/mnt/koji should be mounted ro
/mashroot/mnt/koji should be mounted rw

Additional info:
This is a Fedora box and we can grant access if needed.
Comment 1 Mike McGrath 2007-06-12 10:56:41 EDT
It appears that mtab is reporting incorrectly but /proc/mounts is reporting 
Comment 2 Steve Dickson 2007-06-16 20:23:57 EDT
This broke back in the 2.6.18 kernel... and should be fixed in the
next main stream kernel release with the following commit:

commit 608a2896d6d9079b97715820ae8a5469e70bdecc
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Wed May 16 16:53:28 2007 -0400

    NFS: Error when mounting the same filesystem with different options
    Unless the user sets the NFS_MOUNT_NOSHAREDCACHE mount flag, we should
    return EBUSY if the filesystem is already mounted on a superblock that
    has set conflicting mount options.
    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

Which is relative to the NFS maintainer's tree... 

Its not clear where there will be any more kernel updates
for FC6. But if there is, I'll ask our kernel maintainers 
to include this patch. Note there also need to be an nfs-utils
update as well..