Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 240698

Summary: Mounting different NFS volumes from the same file server inherits RO/RW of the first volume that was mounted
Product: Red Hat Enterprise Linux 5 Reporter: Ariel Biener <ariel>
Component: kernelAssignee: Ian Kent <ikent>
Status: CLOSED DUPLICATE QA Contact: Martin Jenner <mjenner>
Severity: high Docs Contact:
Priority: medium    
Version: 5.0CC: jlayton, staubach, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-31 03:02:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ariel Biener 2007-05-20 17:42:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070221 Red Hat/1.5.0.10-0.1.el4 Firefox/1.5.0.10

Description of problem:
Hello,

  In RHEL 5, kernel-2.6.18-8.1.3.el5, the following bug exists:

Assume:

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.

best,

--Ariel

Version-Release number of selected component (if applicable):
kernel-2.6.18-8.1.3.el5

How reproducible:
Always


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
system".
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 
file system"
7. Umount both file systems
8. Remove the two entries from /etc/fstab


Actual Results:
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.

Expected Results:
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.

Additional info:

Comment 3 Ian Kent 2007-05-31 03:02:33 UTC

*** This bug has been marked as a duplicate of 209964 ***