Skip to contentSkip to conversation

nfs client: Read-only file system (2.6.19-rc1,2)

REGRESSION Jiri Slaby 4 participants 9 messages Oct 17, 2006 – Oct 18, 2006

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

Hi!

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

regards,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
#1 lore raw
Quoted 5 lines · Jiri Slaby

Hi!

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

Quoted 7 lines

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

regards,

What does "cat /proc/mounts" say?

#2 lore raw
Quoted 1 line · Trond Myklebust

On Tue, 2006-10-17 at 17:24 +0200, Jiri Slaby wrote:

Hi,

Quoted 11 lines
Quoted 9 lines

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

What does "cat /proc/mounts" say?

Ok I'm not the OP but I can confirm the problem.

Quoted 1 line

From /proc/mounts:

arthur:/mnt/disk2/mp3 /mnt/mp3 nfs ro,nosuid,nodev,noexec,vers=3,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=arthur 0 0

Reports ro here while mount still reports rw:
arthur:/mnt/disk2/mp3 on /mnt/mp3 type nfs (rw,noexec,nosuid,nodev,addr=192.168.88.80)

Sven

author
#3 lore raw

Do not remove CCs.
Cc: Trond Myklebust <[email protected]>
Cc: Jiri Slaby <[email protected]>

Quoted 14 lines · Sven Hoexter
Quoted 1 line · Trond Myklebust

On Tue, 2006-10-17 at 17:24 +0200, Jiri Slaby wrote:

Hi,

Quoted 9 lines
Quoted 9 lines

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

Quoted 8 lines
Quoted 1 line

What does "cat /proc/mounts" say?

Ok I'm not the OP but I can confirm the problem.

Quoted 1 line

From /proc/mounts:

arthur:/mnt/disk2/mp3 /mnt/mp3 nfs ro,nosuid,nodev,noexec,vers=3,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=arthur 0 0

Reports ro here while mount still reports rw:
arthur:/mnt/disk2/mp3 on /mnt/mp3 type nfs (rw,noexec,nosuid,nodev,addr=192.168.88.80)

I will post my output in some hours, if still needed.

regards,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
author
#4 lore raw
Quoted 22 lines · Jiri Slaby

Do not remove CCs.
Cc: Trond Myklebust <[email protected]>
Cc: Jiri Slaby <[email protected]>

Quoted 17 lines · Sven Hoexter
Quoted 1 line · Trond Myklebust

On Tue, 2006-10-17 at 17:24 +0200, Jiri Slaby wrote:

Hi,

Quoted 10 lines
Quoted 9 lines

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

What does "cat /proc/mounts" say?

Ok I'm not the OP but I can confirm the problem.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

From /proc/mounts:

arthur:/mnt/disk2/mp3 /mnt/mp3 nfs ro,nosuid,nodev,noexec,vers=3,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=arthur 0 0

Reports ro here while mount still reports rw:
arthur:/mnt/disk2/mp3 on /mnt/mp3 type nfs (rw,noexec,nosuid,nodev,addr=192.168.88.80)

I will post my output in some hours, if still needed.

The very same thing. /etc/mtab still reports rw, while /proc/mounts says ro, weird.

regards,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
#5 lore raw
Quoted 29 lines · Jiri Slaby
Quoted 28 lines · Jiri Slaby

Do not remove CCs.
Cc: Trond Myklebust <[email protected]>
Cc: Jiri Slaby <[email protected]>

Quoted 23 lines · Sven Hoexter
Quoted 1 line · Trond Myklebust

On Tue, 2006-10-17 at 17:24 +0200, Jiri Slaby wrote:

Hi,

Quoted 11 lines
Quoted 10 lines

I can't write on mounted nfs filesystem since 2.6.19-rc1 (nfs client):
touch: cannot touch `aaa': Read-only file system

strace says:
open("aaa", O_WRONLY|O_NONBLOCK|O_CREAT|O_NOCTTY|O_LARGEFILE, 0666) = -1
EROFS (Read-only file system)

2.6.18 behaves correctly. Settings are the same, does anybody have any clue?

What does "cat /proc/mounts" say?

Ok I'm not the OP but I can confirm the problem.

Quoted 1 line

From /proc/mounts:

arthur:/mnt/disk2/mp3 /mnt/mp3 nfs ro,nosuid,nodev,noexec,vers=3,rsize=8192,wsize=8192,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=arthur 0 0

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Reports ro here while mount still reports rw:
arthur:/mnt/disk2/mp3 on /mnt/mp3 type nfs
(rw,noexec,nosuid,nodev,addr=192.168.88.80)

I will post my output in some hours, if still needed.

The very same thing. /etc/mtab still reports rw, while /proc/mounts says ro, weird.

I'll bet that you have always had a subdirectory of the exact same filesystem mounted somewhere else ro, right?

The new NFS mount code will put those in the same superblock, and whichever directory gets mounted first will determine whether or not the superblock is marked as read-only.
Basically, NFS is now doing the exact same thing that local filesystems have been doing all the time: if it is on the same disk, then it is all represented by the same superblock. OTOH, if your server is exporting more than one partition, then different partitions will be represented by different superblocks.
We need to do this for the same reason that local filesystems do it: it is the only way to ensure cache consistency. Otherwise, if you make changes to a file that happens to be mounted in more than one place, then you will see inconsistent results on the other mountpoints.

Per-mountpoint control over the 'ro' flag (i.e. to allow you to do 'mount --bind -oro /foo /bar') is a separate issue that needs further work at the VFS level.

Cheers,
Trond

author
#6 lore raw
Quoted 2 lines · Trond Myklebust

I'll bet that you have always had a subdirectory of the exact same filesystem mounted somewhere else ro, right?

Yup, exactly: /usr -ro and /home -rw on the same (hda3) partition.

Quoted 4 lines

The new NFS mount code will put those in the same superblock, and whichever directory gets mounted first will determine whether or not the superblock is marked as read-only.
Basically, NFS is now doing the exact same thing that local filesystems

Quoted 8 lines

have been doing all the time: if it is on the same disk, then it is all represented by the same superblock. OTOH, if your server is exporting more than one partition, then different partitions will be represented by different superblocks.
We need to do this for the same reason that local filesystems do it: it is the only way to ensure cache consistency. Otherwise, if you make changes to a file that happens to be mounted in more than one place, then you will see inconsistent results on the other mountpoints.

thanks for clarification,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E
#7 lore raw
Quoted 5 lines · Jiri Slaby
Quoted 2 lines · Trond Myklebust

I'll bet that you have always had a subdirectory of the exact same filesystem mounted somewhere else ro, right?

Yup, exactly: /usr -ro and /home -rw on the same (hda3) partition.

Just out of curiosity--why are you doing that?

On the linux server, at least, that doesn't really prevent writing to /usr unless you've also turned on subtree checking. And subtree checking causes other problems.

--b.

author
#8 lore raw
Quoted 7 lines · J. Bruce Fields
Quoted 4 lines · Jiri Slaby
Quoted 2 lines · Trond Myklebust

I'll bet that you have always had a subdirectory of the exact same filesystem mounted somewhere else ro, right?

Yup, exactly: /usr -ro and /home -rw on the same (hda3) partition.

Just out of curiosity--why are you doing that?

Not me :). I do not admin that machine.

Quoted 3 lines

On the linux server, at least, that doesn't really prevent writing to /usr unless you've also turned on subtree checking. And subtree checking causes other problems.

thanks,

Signature · 4 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E