Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Last edited by paul415236; 07-18-2018 at 03:57 AM.
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
Last edited by paul415236; 07-18-2018 at 09:19 AM.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.