LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-18-2018, 03:52 AM   #1
paul415236
LQ Newbie
 
Registered: Jul 2018
Posts: 6

Rep: Reputation: Disabled
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

Last edited by paul415236; 07-18-2018 at 03:57 AM.
 
Old 07-18-2018, 08:33 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Why do you think it failed? Did you get an error message?
 
Old 07-18-2018, 09:16 AM   #3
paul415236
LQ Newbie
 
Registered: Jul 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
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

Last edited by paul415236; 07-18-2018 at 09:19 AM.
 
Old 07-18-2018, 09:23 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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?
 
Old 07-18-2018, 09:31 AM   #5
paul415236
LQ Newbie
 
Registered: Jul 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-18-2018, 09:33 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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

Last edited by michaelk; 07-18-2018 at 09:35 AM.
 
1 members found this post helpful.
Old 07-19-2018, 08:40 PM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,790

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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.
 
1 members found this post helpful.
Old 07-19-2018, 09:47 PM   #8
paul415236
LQ Newbie
 
Registered: Jul 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks a million guys!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] any autofs experts here? how to get autofs and WebDAV to play nice? zippydan Linux - General 2 09-05-2016 07:13 PM
[SOLVED] autofs hostname lookup failed: Name or service not known SciFi-Bob Linux - Server 2 10-26-2010 07:38 PM
cifs + autofs failed to lookup (program) UltraSoul Linux - Software 0 06-22-2008 09:53 AM
Autofs ( loading autofs4 failed) thinker Linux - Software 0 04-19-2007 06:54 AM
FC6 - General starting issues, HIDP and AutoFS "Failed" tiger.woods Fedora 2 01-16-2007 09:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration