You are not logged in.
Pages: 1
I have some nfs mounts defined, e.g /home/andrew
I can mount these to /mnt
# mount computer:/home/andrew /mnt/computer
in which case the folder /mnt/computer is my home folder on computer
$ cd /mnt/computer
$ ls
[list of contents of /home/andrew]
Of course
# showmount --exports computer
correctly returns /home/andrew
I have now installed autofs and added
/mnt -hosts --timeout=60
Everything works fine, but not as expected.
If I cd to /mnt/computer I now find that it has mounted /home/andrew to /mnt/computer thus
$ cd /mnt/computer
$ ls
home
$ cd home
ls andrew
$ cd andrew
$ pwd
/mnt/computer/home/andrew
Is it possible to make autofs mount the filesystem in the same way as nfs does?
Andrew
Last edited by fdservices (2013-01-15 12:05:20)
Offline
Yes you can...
EX:
[/etc/autofs/auto.master
/mnt /etc/autofs/auto.nfs]
[/etc/autofs/auto.nfs
computer -timeout=60 host:/path/to/export]
Hope this help.
Offline
You know that systemd has an autofs feature built in?
Offline
Thanks - that worked after I made sure that auto.nfs was properly terminated with a cr/lf
I will look at the systemd (automount?) feature. Thanks for the tip.
Andrew
Offline
And for systemd automounting "good point glorious" Everything I always wish I had baked into linux (with regards to nfs mount handling)
Here's how I did it on my machine:
step one pimp your /etc/fstab
# begin /etc/fstab
# archie needs a /home
server:/path/to/home /home/archie nfs rsize=8192,wsize=8192,timeo=14,rw,soft,intr,noauto,x-systemd.automount 0 0
# end of the world
step 2:
Get rid of the bogus
systemctl disable autofs &&
pacman -Rs autofs &&
rm -r /etc/autofs &&
shutdown -r now
Thats it your free chicken is baked.
Offline
One question
Why rsize=8192,wsize=8192?
Andrew
Offline
OK, that was pretty much a disaster. Set up automount on systemd and it tried to mount shares which were not running at start up in spite of the noauto flag being set. Had to boot into a terminal and reset the fstab before I could start up cleanly.
I have moved back to autofs for the moment, but that also does not appear foolproof. I knwo this is sacrilege, but Windows handles remote mounts much better than Linux.
Andrew
Offline
Pages: 1