Re-posting to the RHEL5 list since the RHEL4 list seems to be very quiet...
-----

I am trying to determine if this is buggy behavior or just some sort of 
"feature" of autofs:

I have two fixed NFS mounts which are read-only (by design):

[root@serverx ~]# grep vol0 /etc/mtab
filer1:/vol/vol0 /mon/filer1/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.58 0 0
filer2:/vol/vol0 /mon/filer2/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.59 0 0

If I use autmount via /net/<host> to access the same NFS path, it is mounted 
read-write (again, by design):

[root@serverx ~]# cd /net/filer2/vol/vol0/etc
[root@serverx etc]# grep vol0 /etc/mtab
filer1:/vol/vol0 /mon/filer1/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.58 0 0
filer2:/vol/vol0 /mon/filer2/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.59 0 0
filer2:/vol/vol0 /net/filer2/vol/vol0 nfs 
rw,nosuid,nodev,soft,intr,addr=192.168.1.59 0 0

However, I am unable to write to the filesystem:

[root@serverx etc]# touch testfile
touch: cannot touch `testfile': Read-only file system

If umount the fixed mounts and let the automount timeout, and then reacces via 
/net it works as expected:

[root@serverx ~]# umount filer1:/vol/vol0
[root@serverx ~]# umount filer2:/vol/vol0
[root@serverx ~]# grep vol0 /etc/mtab
[root@serverx ~]# cd /net/filer2/vol/vol0/etc
[root@serverx etc]# grep vol0 /etc/mtab
filer2:/vol/vol0 /net/filer2/vol/vol0 nfs 
rw,nosuid,nodev,soft,intr,addr=192.168.1.59 0 0
[root@serverx etc]# touch testfile
[root@serverx etc]# touch testfile
[root@serverx etc]# ls -l testfile
-rw-r--r--  1 root root 0 Jun 17 10:37 testfile

I can then remount the fixed mounts and it continues to be writable:

[root@serverx etc]# grep vol0 /etc/mtab
filer2:/vol/vol0 /net/filer2/vol/vol0 nfs 
rw,nosuid,nodev,soft,intr,addr=192.168.1.59 0 0
filer1:/vol/vol0 /mon/filer1/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.58 0 0
filer2:/vol/vol0 /mon/filer2/vol/vol0 nfs ro,nosuid,bg,addr=192.168.1.59 0 0
grep vol0 /etc/mtab
[root@serverx etc]# touch testfile
[root@serverx etc]# ls -l testfile
-rw-r--r--  1 root root 0 Jun 17 10:38 testfile

But now, my read-only mounts are writable!

[root@serverx etc]# cd /mon/filer2/vol/vol0/etc
[root@serverx etc]# touch testfile
[root@serverx etc]# ls -l testfile
-rw-r--r--  1 root root 0 Jun 17 10:39 testfile

I am on RHEL4.8, autofs5:

[root@serverx etc]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
[root@serverx etc]# rpm -q autofs5
autofs5-5.0.1-0.rc2.106.el4_8.4
[root@serverx etc]# ps -ef | grep auto
root      3178     1  0 Jun11 ?        00:07:25 automount5

I have replaced host names and IP addresses in this output...

Thanks,

Kevin
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to