Professional Documents
Culture Documents
It's Only Code: Linux Mint: Setup Autofs To Mount Automatically NFS-shares From A Synology
It's Only Code: Linux Mint: Setup Autofs To Mount Automatically NFS-shares From A Synology
Search
Linux Mint: Setup autofs to mount automatically NFS-shares from a Synology
OBJECTIVE ABOUT ME
I installed Linux Mint 17.1 Rebecca on a new computer and I want to access the NFS shares from my Follow 0
Synology Disk Station.
View my complete
profile
MOTIVATION
ARCHIVE
As my Synology is not always running 24/7 it would be nice just to mount the NFS shares on my client
computers on access and to avoid to integrate the shares statically in fstab. Integrating the shares in fstab ► 2018 (2)
would work, but I will always have to wait until a timeout is fullfilled while booting my computer, when the ► 2017 (1)
Synology is not running. I already set-up autofs for this "mount on demand" purpose on my laptop,
► 2016 (3)
which eves not always in the same network as my Synology.
▼ 2015 (8)
Download and install the autofs package via the following command from a shell: ► 2014 (2)
► 2013 (3)
$> sudo apt-get install autofs
@CWSCHMIDT
you'll see some output like this: Tweets of @cwschmidt
1 of 5 8/1/18, 10:58 AM
It's only code: Linux Mint: Setup autofs to mount ... http://itsonlycode.blogspot.com/2015/02/linux-min...
Additionally install the nfs-common package, otherwise you won't be able to access the NFS shares.
2 of 5 8/1/18, 10:58 AM
It's only code: Linux Mint: Setup autofs to mount ... http://itsonlycode.blogspot.com/2015/02/linux-min...
Configure autofs
First create the destination directory where you want to mount the directories of your NFS server into. In
my case this is below /mnt/DiskStation
Now add your exported NFS-Shares root-directory from your server to the "/etc/auto.master":
/mnt/DiskStation /etc/auto.nfs
#
# Sample auto.master file
#
# ...
#
#/misc /etc/auto.misc
#/net -hosts
#
# Include /etc/auto.master.d/*.autofs
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# ...
#
+auto.master
/mnt/DiskStation /etc/auto.nfs
Create a "/etc/auto.nfs" with the following content (where "192.168.0.99" is the IP of your Synology
and "data" is the name of the exported directory):
data 192.168.0.99:/volume1/data
autofs stop/waiting
autofs start/running, process 4084
Done. Now you should be able to access the files from your Synology at /mnt/DiskStation/data.
3 of 5 8/1/18, 10:58 AM
It's only code: Linux Mint: Setup autofs to mount ... http://itsonlycode.blogspot.com/2015/02/linux-min...
No comments:
Post a Comment
Christian Schmidt, Regensburg, 2010 - 2015. Picture Window theme. Powered by Blogger.
4 of 5 8/1/18, 10:58 AM
It's only code: Linux Mint: Setup autofs to mount ... http://itsonlycode.blogspot.com/2015/02/linux-min...
5 of 5 8/1/18, 10:58 AM