Summary: | util-linux's `mount -at nfs` misbehaves wrt to read only/write options | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fab <netbox253> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | emilbeinroth |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Fab
2007-03-03 02:28:49 UTC
the netmount script merely runs `mount` try doing: umount /data/partage mount -at nfs ok, the problem doesn't seems to be with the netmount script, but simply with mount : in fact I export several directories from /data in readonly before this one, and mount doesn't seems to read the fstab correctly. Look at this : if I mount one directory in readonly before /data/partage, /data/partage will be in readonly : ==> mount -at nfs gives the same issue. # mount -v /data/partage 192.168.2.78:/data/partage on /data/partage type nfs (rw,hard,intr,addr=192.168.2.78) # touch /data/partage/aaa # umount /data/partage # mount -v /data/musique 192.168.2.78:/data/Musique on /data/musique type nfs (ro,hard,intr,addr=192.168.2.78) # mount -v /data/partage 192.168.2.78:/data/partage on /data/partage type nfs (rw,hard,intr,addr=192.168.2.78) # LC_ALL=C touch /data/partage/aaa touch: cannot touch `/data/partage/aaa': Read-only file system /etc/fstab : ------------ 192.168.2.78:/data/Jeux /data/jeux nfs ro,hard,intr 0 0 192.168.2.78:/data/Musique /data/musique nfs ro,hard,intr 0 0 192.168.2.78:/data/photos /data/photos nfs ro,hard,intr 0 0 192.168.2.78:/data/partage /data/partage nfs rw,hard,intr 0 0 If i modify the fstab like following (/data/partage before others), it works, but the others seem to be mounted in rw in /proc/mounts, but they are in readonly. /etc/fstab : ------------ 192.168.2.78:/data/partage /data/partage nfs rw,hard,intr 0 0 192.168.2.78:/data/Jeux /data/jeux nfs ro,hard,intr 0 0 192.168.2.78:/data/Musique /data/musique nfs ro,hard,intr 0 0 192.168.2.78:/data/photos /data/photos nfs ro,hard,intr 0 0 # mount -at nfs # grep data /proc/mounts 192.168.2.78:/data/partage /data/partage nfs rw,vers=3,rsize=32768, [snip...] 192.168.2.78t:/data/Jeux /data/jeux nfs rw,vers=3,rsize=32768, [snip...] 192.168.2.78:/data/Musique /data/musique nfs rw,vers=3,rsize=32768, [snip...] 192.168.2.78:/data/photos /data/photos nfs rw,vers=3,rsize=32768, [snip...] # LC_ALL=C touch /data/musique/aaa touch: cannot touch `/data/musique/aaa': Read-only file system # LC_ALL=C touch /data/photos/aaa touch: cannot touch `/data/photos/aaa': Read-only file system # LC_ALL=C touch /data/jeux/aaa touch: cannot touch `/data/jeux/aaa': Read-only file system # LC_ALL=C touch /data/partage/aaa I have/had the same problem .. after doing a little search I found this: http://thread.gmane.org/gmane.linux.nfs/11391 .. which referred to this: http://lkml.org/lkml/2006/10/18/264 Setting an explicit fsid for the mounts solved the problem for me. looks like this is a nfs/kernel issue that is being worked on. in the meantime, you can workaround things by using the fsid in /etc/exports as Emil helpfully points out. |