Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-28-2016, 07:01 AM   #1
Registered: Sep 2012
Distribution: Neon (atm)
Posts: 44

Rep: Reputation: Disabled
Automount network shares - several questions including autoFS or systemd?


I've done some reading and i've gotten lost before i start.

My Experience:
In KDE? Basically none. I've dabbled a small amount with a variety of distros but it's just been a curiosity and never with KDE. I've never replaced Windows, Until now.

What i'm using:
KDE Neon 5.7 with all the updates.
NAS - Synology with SMB on.

Wish list:
  1. At login, automount shares i've specified, e.g. currently SMB://NAS/Apps
  2. If those shares are not available when i login, automount them once they become available
  3. use my credentials, not root.
  4. preferably not store the credentials in clear text
  5. use the same methods for automounting non-linux local drives (e.g. a Windows NTFS partition/drive)

Research has led me to this point:
I thought i figured out that i needed autoFS as it is better than only editing the fstab. Even then i couldn't find anything that told me that my wish list was achievable - it was more 'how to' not 'what it can do'. I see there are some posts about it in this forum. I've also read that systemd can do what autoFS can do and maybe even that it is 'replacing' autoFS.

My actual questions:
  1. So my first question is whether i should use autoFS or systemd?
  2. Should i even use SMB? It's the only one i've ever seen used and i just assume it's what you do.
  3. Right now i'm stuck trying to figure out if either autoFS or systemd will actually do my wish list. Will either/both?
  4. How? If everyone says to use one and not the other then i can go off and just research that one thing. I think i can figure out autoFS from the Arch wiki and other sources, but i haven't found much at all on the systemd.


Last edited by Recusant; 08-28-2016 at 07:03 AM.
Old 08-28-2016, 06:32 PM   #2
Doug G
Registered: Jul 2013
Posts: 626

Rep: Reputation: Disabled
I use autofs to automount a couple windows shares to fedora 23. Setting it up involved creating the desired mount points, editing /etc/auto.master, creating a couple /etc/auto.<some-name> files with the information for a share, including path to the smb credentials file for the share, starting the autofs service and testing.

Once I created the mount points, I verified I could mount the windows share using the mount command (specified -t=cifs). The hardest part of the setup was finding useful documentation
Old 08-28-2016, 06:48 PM   #3
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
If using KDE, I believe you could mount smb shares with smb://<user>@<server/path/to/directory> as url in konqueror or similar application

It works with ssh, ftp, nfs too, eg with ssh:

Last edited by keefaz; 08-28-2016 at 06:53 PM.
Old 08-28-2016, 09:38 PM   #4
Registered: Aug 2002
Posts: 15,099

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
I've briefly played with both autofs and systemd.automount, both work as expected. Filesystems are mounted when you access the mountpoint (i.e. cd or via file browser) and they are automatically unmounted after the idle timeout period has elapsed. I have no preference, see which one you like.

I use both nfs and cifs (SMB) to connect to my Synology NAS. SMB:// is a file browser built in virtual file system to access windows shares (CIFS). As stated you can also access sftp, ftp and nfs in a similar manner. Did you create a bookmark for the shares in your file browser. If that works maybe you do not need automount. If you want to access the file system using the command line then mounting via fstab (or autofs) would be my preference.
Old 08-28-2016, 10:13 PM   #5
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,636

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Using an automounted filesystem is up to you. I've seen/used fstab nfs mounts and automounts.

The results depend on what you expect.

NFS mounts take time to process (and can take some 30 seconds depending on the parameters - number of retries, server load, timeouts, ...)

The advantage of automounting is that it means they don't get mounted unless something wants data from that mount. The disadvantage is having to wait until it is mounted.

One of the issues is that if all you want to know is if a file is present - you wait to find out. Now once it is mounted finding out is not that bad...

Where I worked we had NFS mounts for users home directories... but the users didn't want to have to wait 5-10 seconds for the mount to take place.

Since we had some 800 daily users, there were a LOT of mount requests going on... and that tended to delay things (ie cause calls to the help desk about the users login hanging...).

So instead of automount, we mounted at boot time using the fstab.

BTW, one other thing that can sneak up on you is the NFS failover capability. It can be nice to have - but the recovery time can be really long as the timeouts/retries all have to fail first (this is one feature I didn't get to use as it wasn't sufficiently reliable at the time).

Last edited by jpollard; 08-28-2016 at 10:17 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
autofs ldap automount bbolin Red Hat 3 11-06-2013 10:00 AM
can't get autofs to automount CD Drives bret381 Linux - Newbie 2 12-20-2009 08:12 AM
Automount Netapp NFS shares on Linux with AUTOFS athreyavc Linux - Server 2 10-30-2007 06:34 PM
Autofs and automount socks Linux - Software 0 07-20-2004 01:28 PM
Setting up automount with autofs smattbac Slackware 0 10-12-2003 09:51 AM

All times are GMT -5. The time now is 11:45 AM.

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