something (FS-Cache?) broke nfs-mounts

Timo Aaltonen tjaalton at cc.hut.fi
Thu Dec 14 14:40:21 EST 2006


On Thu, 14 Dec 2006, Trond Myklebust wrote:

> On Thu, 2006-12-14 at 13:50 +0200, Timo Aaltonen wrote:
>>  	Hi
>>
>> There's something weird going on with nfs-mounts with recent kernels. See
>> these bugreports:
>>
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207670
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=209964
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217793
>>
>> I've tested this on Ubuntu Edgy (2.6.19) and Feisty (2.6.19 & 2.6.20-rc1)
>> and a fellow worked tried RHEL5b2. To summarize: permissions from the
>> first mount from a given server are inherited by following mounts from the
>> same server. So if the first mount is ro, all rw-mounts are ro as well.
>> This can be worked around by making the rw mount first.
>
> This has been explained over and over again on the various lists. The
> behaviour of NFS now mirrors that of local filesystems. If you want to
> be able to mount the same filesystem as rw in one place and ro in
> another, then you will need to add VFS support for per-mountpoint
> read-only flags.

Umm, same filesystem? We are talking about different export paths and 
mountpoints here.. quote from #209964 :

--

# grep nfs /etc/fstab
nfsserver:/vol/bin/gen  /m/fs/gen  nfs ro,vers=3,tcp,hard,intr,bg 0 0
nfsserver:/vol/bin/rw   /m/fs/rw   nfs rw,vers=3,tcp,hard,intr,bg 0 0

# mount|grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsserver:/vol/bin/gen on /m/fs/gen type nfs (ro,...)
nfsserver:/vol/bin/rw on /m/fs/rw type nfs (rw,...)

# grep nfs /proc/mounts
nfsserver:/vol/bin/gen /m/fs/gen nfs ro,... 0 0
nfsserver:/vol/bin/rw /m/fs/rw nfs ro,... 0 0

# touch /m/fs/rw/test
touch: cannot touch `/m/fs/rw/test': Read-only file system

This behaviour occurs per file system type (nfsv3, nfsv4) ie. all nfsv3 
mounts get the ro/rw option of the first nfsv3 mount and all nfsv4 mounts 
get the ro/rw option of the first nfsv4 mount.

--



t


More information about the NFSv4 mailing list