Bug 380171 - NFS client is confused by different exports from same filesystem
Summary: NFS client is confused by different exports from same filesystem
Keywords:
Status: CLOSED DUPLICATE of bug 243913
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: All
OS: Linux
low
high
Target Milestone: ---
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-13 15:30 UTC by Ben Slusky
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-13 18:45:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ben Slusky 2007-11-13 15:30:21 UTC
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 18:45:55 UTC
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.