[ubuntu-us-mi] mounting NFS shares via autofs
Robert Citek
robert.citek at gmail.com
Thu Jun 20 20:04:54 UTC 2013
Greetings all,
How can I configure autofs to mount exactly as if I had mounted the
filesystem manually?
Here's a example of manually mounting an NFS share:
# mount -o ro 127.0.0.1:/tmp/shared.out/ /tmp/nfs.share/
# cat /tmp/nfs.share/hw.txt
hello, world
# mount | grep nfs.share
127.0.0.1:/tmp/shared.out/ on /tmp/nfs.share type nfs (ro,addr=127.0.0.1)
# umount /tmp/nfs.share/
Here is the same process using autofs:
# grep nfs /etc/auto.master
/- /etc/auto.nfs
# grep nfs /etc/auto.nfs
/tmp/nfs.share/ -ro 127.0.0.1:/tmp/shared.out/
# /etc/init.d/autofs start
# cat /tmp/nfs.share/hw.txt
hello, world
# mount | grep nfs.share
/tmp/shared.out on /tmp/nfs.share type none (rw,bind)
Although the NFS share is mounted to the correct mountpoint via
autofs, the share is mounted read-write even though the options in the
map file /etc/auto.nfs specify read-only (-ro). According to the
docs, this should work[1]. What am I missing?
Any pointers appreciated.
[1] https://help.ubuntu.com/community/Autofs
Regards,
- Robert
More information about the ubuntu-us-mi
mailing list