LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-10-2022, 12:13 PM   #1
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Rep: Reputation: 2
Why does AutoFS only auto mount a share when you change to the directory?


When I setup AutoFS it only shows the mount when you change to the directory the mount is on?
 
Old 08-10-2022, 12:44 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
that is the goal of autofs: the filesystem will be automatically mounted when needed and will be unmounted if not in use.
 
Old 08-10-2022, 05:54 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
It appears like the title and the post are asking two different questions.

I believe the OP is actually asking about the mount point directory not being created and not its contents. In similar reasoning because that is how it works. You can add the browse (or --ghost ) option on that line in your auto.master file for that particular share to create the directory before it is mounted like:

Code:
/media/[my_server] /etc/autofs/auto.[my_server] --timeout 60 browse
https://wiki.archlinux.org/title/autofs
https://man7.org/linux/man-pages/man....master.5.html

Last edited by michaelk; 08-10-2022 at 06:58 PM.
 
  


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] autofs passing username to autofs mounts Timothy Miller Linux - General 3 08-27-2018 06:24 PM
[SOLVED] any autofs experts here? how to get autofs and WebDAV to play nice? zippydan Linux - General 2 09-05-2016 07:13 PM
autofs does not auto-mount cdrom Hammo Linux - General 9 12-28-2012 04:08 AM
Auto-mount windows share on boot - manual OK, auto not ok! erskie Linux - Newbie 2 02-12-2008 06:42 PM
autofs enabled in kernel but auto.mount and auto.master are NOT in /etc! Alybyzrp Linux - General 0 11-11-2003 12:26 PM

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

All times are GMT -5. The time now is 12:03 AM.

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