Göran is right -- you're running into the "you can't mount the same filesystem twice" issue. I worked with Red Hat back in the RHEL5 beta days to chase this one down -- here's the explanation that Red Hat's engineers provided:

*****
The idea is that having a single super_block structure per server per FSID prevents corner cases that can lead to corrupt dentry cache trees, prevents conflicting buffer cache contents to what ends up being the same file, and some other scary situations.

So the deal is, the mount flags (and NFS options) are set only the first time that a given combination of server and filesystem are mounted. If you ever mount the same filesystem from the same server on another mountpoint, you'll get the flags and options that were passed on to the first mount. There's no working around that.
*****

So if you mount export XYZ at /foo with options A, B and C, then mount it again at /bar from the same host while it is still mounted at /foo, the /bar mount will always get the exact same options that the /foo mount has, regardless of what you requested in the /bar mount.

Here's the BZ that we worked through back in 2006: https://bugzilla.redhat.com/show_bug.cgi?id=209964

The net result of this effort was the nosharecache mount option. From the nfs(5) manpage:

nosharecache

As of kernel 2.6.18, it is no longer possible to mount the same same filesystem with different mount options to a new mountpoint. It was deemed unsafe to do so, since cached data cannot be shared between the two mountpoints. In consequence, files or directories that were common to both mountpoint subtrees could often be seen to be out of sync following an update.

This option allows administrators to select the pre-2.6.18 behaviour, permitting the same filesystem to be mounted with different mount options. Beware: Use of this option is not recommended unless you are certain that there are no hard links or subtrees of this mountpoint that are mounted elsewhere.


Paul Krizak                         7171 Southwest Pkwy MS B200.3A
MTS Systems Engineer                Austin, TX  78735
Advanced Micro Devices              Desk:  (512) 602-8775
Linux/Unix Systems Engineering      Cell:  (512) 791-0686
Global IT Infrastructure            Fax:   (512) 602-0468

On 08/11/2011 12:23 AM, Göran Uddeborg wrote:
Collins, Kevin [BEELINE]:
I have two fixed NFS mounts which are read-only (by design):

If I use autmount via /net/<host>  to access the same NFS path, it is mounted
read-write (again, by design):

However, I am unable to write to the filesystem:

I seem to remember that it wasn't possible to mount the same NFS file
system twice with different options.  The second mount would inherit
the options of the first.  Look at the nosharecache mount option for
some information.  And search bugzilla or google for further info.  It
was a while ago I discussed it, and I don't have a reference handy.

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list



_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to