Bug 7612 - NFS share is default mounted ro and if I remount it I can write to it
Summary: NFS share is default mounted ro and if I remount it I can write to it
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: File System
Classification: Unclassified
Component: NFS (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Trond Myklebust
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-01 11:08 UTC by Daniel Smolik
Modified: 2006-12-01 11:36 UTC (History)
0 users

See Also:
Kernel Version: 2.6.19
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Daniel Smolik 2006-12-01 11:08:20 UTC
Most recent kernel where this bug did *NOT* occur: 2.6.18.2
Distribution: Debian Sarge
Hardware Environment: Amd Atholon
Software Environment: Debian Sarge  mount 2.4.2
Problem Description:
I have diskless linux client and on server I have exported this direcories

1)/var/lib/diskless/default/root     192.168.3.0/255.255.255.0(ro,async)
2)/var/lib/diskless/default/192.168.3.48  192.168.3.48(rw,no_root_squash,async)
When clien boots it mounts as root 1) and it is read only. After this mount 2)
as /etc/ /tmp/ /dev and /var over this and this directories are normaly
read-wite. But with 2.6.19 direcories are default mounted ro and if I eg. do
mount /tmp -o remount,rw now /etc/ /dev/ /tmp/ /var are mounted rw !!!.

Steps to reproduce:
Server which exports have kenrnel 2.6.18.2 and client 2.6.19
Comment 1 Trond Myklebust 2006-12-01 11:30:21 UTC
The VFS does not, and has not ever, allowed you to remount the same 
filesystem with different mount options. NFS 'allowed' this because if you
mounted a different directory, it would treat that as a different filesystem.
Unfortunately, that leads to nasty cache consistency problems.

As of 2.6.19, NFS will group all directories that belong to the same
filesystem on the server into the same superblock and hence treat them as the
same filesystem on the client.
Comment 2 Daniel Smolik 2006-12-01 11:36:44 UTC
Thanks for explanation, but problem is in another place :-) I compile kenrnel
with NFSv3 and NFSv4 support ana problem disapear na client boots. Thanks again. 

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