Bug 311221 - NFS inherited read-only
NFS inherited read-only
Status: CLOSED DUPLICATE of bug 209964
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Layton
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-28 11:45 EDT by Red Hat Production Operations
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-28 13:46:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Red Hat Production Operations 2007-09-28 11:45:27 EDT
We have two nfs exports that are being served from a NetApp filer and are
mounted on a RHEL5 x86_64 machine running 2.4.9-e.70smp.

The exports are mounted as such:
192.168.0.20:/vol/www/www.example.com on /var/www/www.example.com type nfs
(ro,nosuid,nodev,noatime,nolock,hard,intr,bg,nfsvers=3,rsize=32768,actimeo=15,addr=192.168.0.20)

192.168.0.20:/vol/www/www.example.com-logs/logs/spool on
/var/log/httpd/nfs/spool type nfs
(rw,nosuid,nodev,noatime,hard,intr,bg,nfsvers=3,rsize=4096,wsize=4096,addr=192.168.0.20)

Note that the mount on /var/www/www.example.com is read-only and the mount on
/var/log/httpd/nfs/spool is read-write.

The export configuration on the filer is valid and is properly exported (and
flushed prior for good measure):
/vol/www/www.example.com-logs    -sec=sys,rw=192.168.0.101
/vol/www/www.example.com    -sec=sys,ro=192.168.0.101

When /vol/www/www.example.com is mounted first, and
/vol/www/www.example.com-logs is mounted second, /vol/www/www.example.com-logs
incorrectly inherits /vol/www/www.example.com's read-only access.

Example:
[root@192.168.0.101 ~]# mount -t nfs 192.168.0.20:/vol/www/www.example.com
/var/www/www.example.com -o
ro,nolock,hard,intr,bg,noatime,nodev,nosuid,nfsvers=3,rsize=32768,actimeo=15,async
[root@192.168.0.101 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.0.20:/vol/www/www.example.com on /var/www/www.example.com type nfs
(ro,nosuid,nodev,noatime,nolock,hard,intr,bg,nfsvers=3,rsize=32768,actimeo=15,addr=10.8.2.20)
[root@192.168.0.101 ~]# mount -t nfs
192.168.0.20:/vol/www/www.example.com-logs/logs/spool /var/log/httpd/nfs/spool
-o defaults,rw,hard,intr,bg,noatime,nodev,nosuid,nfsvers=3,rsize=4096,wsize=4096
[root@192.168.0.101 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.0.20:/vol/www/www.example.com on /var/www/www.example.com type nfs
(ro,nosuid,nodev,noatime,nolock,hard,intr,bg,nfsvers=3,rsize=32768,actimeo=15,addr=10.8.2.20)
192.168.0.20:/vol/www/www.example.com-logs/logs/spool on
/var/log/httpd/nfs/spool type nfs
(rw,nosuid,nodev,noatime,hard,intr,bg,nfsvers=3,rsize=4096,wsize=4096,addr=10.8.2.20)
[root@192.168.0.101 ~]# touch /var/log/httpd/nfs/spool/test.txt
touch: cannot touch `/var/log/httpd/nfs/spool/test.txt': Read-only file system

/var/log/httpd/nfs/spool/ shows as being mounted read-write yet I am incorrectly
told it is read-only and prevented from touch a file on it.

When /vol/www/www.redhat.com-logs is mounted first, and /vol/www/www.example.com
is mounted second, /vol/www/www.example.com-logs is properly set to read-write.

Example:
[root@192.168.0.101 ~]# umount -a -t nfs
[root@192.168.0.101 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@192.168.0.101 ~]# mount -t nfs
192.168.0.20:/vol/www/www.example.com-logs/logs/spool /var/log/httpd/nfs/spool
-o defaults,rw,hard,intr,bg,noatime,nodev,nosuid,nfsvers=3,rsize=4096,wsize=4096
[root@192.168.0.101 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.0.20:/vol/www/www.example.com-logs/logs/spool on
/var/log/httpd/nfs/spool type nfs
(rw,nosuid,nodev,noatime,hard,intr,bg,nfsvers=3,rsize=4096,wsize=4096,addr=10.8.2.20)
[root@192.168.0.101 ~]# mount -t nfs 192.168.0.20:/vol/www/www.example.com
/var/www/www.example.com -o
ro,nolock,hard,intr,bg,noatime,nodev,nosuid,nfsvers=3,rsize=32768,actimeo=15,async
[root@192.168.0.101 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.0.20:/vol/www/www.example.com-logs/logs/spool on
/var/log/httpd/nfs/spool type nfs
(rw,nosuid,nodev,noatime,hard,intr,bg,nfsvers=3,rsize=4096,wsize=4096,addr=10.8.2.20)
192.168.0.20:/vol/www/www.example.com on /var/www/www.example.com type nfs
(ro,nosuid,nodev,noatime,nolock,hard,intr,bg,nfsvers=3,rsize=32768,actimeo=15,addr=10.8.2.20)
[root@192.168.0.101 ~]# touch /var/log/httpd/nfs/spool/test.txt
[root@192.168.0.101 ~]# ll /var/log/httpd/nfs/spool/test.txt
-rw-r--r-- 1 root root 0 Sep 28 11:36 /var/log/httpd/nfs/spool/test.txt

This is reproducible every time.

My theory is that the kernel is doing a partial name match on the export name
when determining the type of access it has. This problem does not appear in
older versions of RHEL.

Please advise.
Comment 1 Jeff Layton 2007-09-28 13:46:20 EDT
Sounds like a dupe of bug #209964, except that this doesn't make much sense:

> We have two nfs exports that are being served from a NetApp filer and are
> mounted on a RHEL5 x86_64 machine running 2.4.9-e.70smp.

I'm going to assume that this is a mistake and you're not actually running a
RHEL5 machine with a RHEL2.1 kernel. If it's not a mistake then go ahead and
reopen this bug and explain why you have such a crazy configuration.


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

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