autofs failed
Hi,
I'm testing the function"autofs" on Ubuntu16.04 x64. https://askubuntu.com/questions/8843...fs-via-autonfs Things I've done were: 1. file: /etc/auto.master /mnt /etc/auto.test 2. file: /etc/auto.test nfs -fstype=nfs 10.100.7.34:/home/paul/nfs 3. restart the autofs service. But when I access to /mnt, the result likes: $mount | grep mnt /etc/auto.test on /mnt type autofs (rw,relatime,fd=6,pgrp=1131,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=20992) However I'm sure the destination could be mounted manually with the command: mount -t nfs 10.100.7.34:/home/paul/nfs /mnt why autofs failed? many thanks, Paul |
Why do you think it failed? Did you get an error message?
|
Hi Sean,
Thanks for your replay. No error message was responsed, Since there are some files in 10.100.7.34:/home/paul/nfs, but can't see anything in /mnt, so I think it was not been mounted expectedly Thanks Paul |
Can you see the files in /home/paul/nfs?
On my system mount on returns a list of mount points, it doesn’t show what’s in them...you appear to have one for /mnt, yes? |
Yes, I can see files in /home/paul/nfs
The mount point I saw is /etc/auto.test on /mnt type autofs (rw,relatime,fd=6,pgrp=1131,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=20992 |
Welcome to LinuxQuestions
The ArchWiki is a good reference for configuring Autofs https://wiki.archlinux.org/index.php/autofs What happens if you try going to /mnt/nfs from the command line. cd /mnt/nfs |
With the entry in auto.master you defined that /mnt is contolled by auto.test. Each key in auto.test is a further directory in /mnt.
Your first and perhaps yet only key is "nfs". So you must access /mnt/nfs in order to have autofs attempt to mount it there. When no longer accessed the /mnt/nfs will be unmounted after some time and disappear. If you find it confusing that /mnt appears empty, then you can add a -browse option in auto.master: /mnt /etc/auto.test -browse Then, when looking in /mnt with ls -l, the keys appear as directories, with arbitrary attributes if not yet mounted. |
Thanks a million guys!
|
All times are GMT -5. The time now is 01:10 AM. |