Red Hat Bugzilla – Bug 240698
Mounting different NFS volumes from the same file server inherits RO/RW of the first volume that was mounted
Last modified: 2007-11-30 17:07:44 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:18.104.22.168) Gecko/20070221 Red Hat/22.214.171.124-0.1.el4 Firefox/126.96.36.199
Description of problem:
In RHEL 5, kernel-2.6.18-8.1.3.el5, the following bug exists:
mount fileserver:/path1 -o ro
mount fileserver:/path2 -o rw
The results (from /proc/mounts) is that both filesystems are
mounted read-only. If you change the order of the mounts, aka:
mount fileserver:/path1 -o rw
mount fileserver:/path2 -o ro
In this case, /proc/mounts shows both file systems as read-write.
Tested using a few RHEL5 machines (x86_64 based). Testing against
a Netapp NFS file server. Behaviour doesn't occur in RHEL3 or RHEL4.
It appears to be a caching of mount attributes issue, a buffer or
space that is not released/cleared. As such, this appears to be a
kernel related problem.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure a NFS server (on any machine), export two or more filesystems
to a RHEL5 machine as read write.
2. Add in /etc/fstab of the RHEL5 machine two lines, as follows:
fileserver:/path1 /path1 nfs ro
fileserver:/path1 /path2 nfs rw
3. Mount the filesystems. Check /proc/mounts and see that both were mounted
read-only. Try to write to /path2/ and see that it will say "Read only file
4. Umount both file systems.
5. Edit /etc/fstab, as follows:
fileserver:/path1 /path1 nfs rw
fileserver:/path1 /path2 nfs ro
6. Mount the filesystems. Check /proc/mounts and see that both were mounted
read-write. Try to write to /path2/ and see that it will not say "Read only
7. Umount both file systems
8. Remove the two entries from /etc/fstab
In both tests, both file systems were mounted with the attribute of the
first file system mounted, regardless of /etc/fstab defined attributes,
or of mount attributes (if called manually) of the subsequent file
systems mounted from the same NFS server.
Each NFS file system should be mounted according to attributes
defined for it in /etc/fstab or on the mount command line if
mount is called manually, and there should be no interraction
between unrelated file systems mounted via NFS from the same
file server whereas mount options are concerned.
*** This bug has been marked as a duplicate of 209964 ***