Bug 380171 - NFS client is confused by different exports from same filesystem
NFS client is confused by different exports from same filesystem
Status: CLOSED DUPLICATE of bug 243913
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
All Linux
low Severity high
: ---
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-13 10:30 EST by Ben Slusky
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-13 13:45:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ben Slusky 2007-11-13 10:30:21 EST
Description of problem:

I'm trying to mount two NFS shares, one read-only and one read-write. The shares
live on the same filesystem on the same server. The NFS client seems to mount
the second share with the same permissions as the first share, i.e. if I try to
mount the read-write share after the read-only share, the read-write share will
be mounted read-only as well.


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

kernel-2.6.18-8.1.15.el5


How reproducible:

Always.


Steps to Reproduce:

# uname -a
Linux nfsclientbox 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:28 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux
# ssh fileserver grep test-r /etc/exports
/vol01/test-ro          172.25.0.0/16(ro)
/vol01/test-rw          172.25.0.0/16(rw)
# mkdir /mnt/test-ro /mnt/test-rw
# mount -t nfs -o ro fileserver:/vol01/test-ro /mnt/test-ro
# mount -t nfs -o rw fileserver:/vol01/test-rw /mnt/test-rw
# grep fileserver /etc/mtab
fileserver:/vol01/test-ro /mnt/test-ro nfs ro,addr=1.2.3.4 0 0
fileserver:/vol01/test-rw /mnt/test-rw nfs rw,addr=1.2.3.4 0 0
# grep fileserver /proc/mounts
fileserver:/vol01/test-ro /mnt/test-ro nfs
ro,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver
0 0
fileserver:/vol01/test-rw /mnt/test-rw nfs
ro,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver
0 0
#
# touch /mnt/test-ro/foobar
touch: cannot touch `/mnt/test-ro/foobar': Read-only file system
# touch /mnt/test-rw/foobar
touch: cannot touch `/mnt/test-rw/foobar': Read-only file system
#
# umount /mnt/test-ro /mnt/test-rw
# mount -t nfs -o rw fileserver:/vol01/test-rw /mnt/test-rw
# mount -t nfs -o ro fileserver:/vol01/test-ro /mnt/test-ro
# grep fileserver /etc/mtab
fileserver:/vol01/test-rw /mnt/test-rw nfs rw,addr=1.2.3.4 0 0
fileserver:/vol01/test-ro /mnt/test-ro nfs ro,addr=1.2.3.4 0 0
# grep fileserver /proc/mounts
fileserver:/vol01/test-rw /mnt/test-rw nfs
rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver
0 0
fileserver:/vol01/test-ro /mnt/test-ro nfs
rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver
0 0
#
# touch /mnt/test-ro/foobar
touch: cannot touch `/mnt/test-ro/foobar': Read-only file system
# touch /mnt/test-rw/foobar
# ls /mnt/test-rw/foobar
/mnt/test-rw/foobar


Expected results:

 * Should have been able to touch /mnt/test-rw/foobar the first time
 * /proc/mounts should always show /mnt/test-ro mounted read-only and
/mnt/test-rw mounted read-write


Additional info:

Bug seems to be present in some stock FC5 kernels as well (observed on
2.6.18-1.2257.fc5). Maybe due to NFS client code rewrite?
Comment 1 Jeff Layton 2007-11-13 13:45:55 EST
This is already fixed in 5.1


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

Note You need to log in before you can comment on or make changes to this bug.