I also have a synology NAS and mount via NFS but I don’t do that via fstab anymore since I started using autofs
- I recommend this as a better alternative as it works by defining mount points on your machine that will mount when you try to access them if the server is on (or not if it’s off). If you stick with fstab
mounting hopefully the Synology stuff here will help. I was hoping I had an old fstab
backed up from before or some commented out mounts, but they were on my old machine.
I have my internal network subnet whitelisted for NFS access in the Synology Control Panel > Shared Folder > {my-folder} > NFS Permissions like this (for each folder available)…
IP Range Start/Subnet Mask | Read/Write | Map all users to admin | Yes | Denied | Allowed
Under Control Panel > File Services > SMB/AFP/NFS I have “Enable NFS” checked.
If you want to try autofs instead…
On my PC, with autofs installed, I have a folder /etc/autofs/
- In there I have edited the provied autofs.master
file to point to my shares so the last 2 lines in the file are…
/mnt /etc/autofs/auto.shares --time-out=10 --ghost
+auto.master
This tells autofs that the directories in the folder /mnt
are mounted by mount points defined in auto.shares
.
auto.shares
looks like this…
backups -fstype=nfs,rw,soft,retry=0 mediastation.local:/volume1/backups
homes -fstype=nfs,rw,soft,retry=0 mediastation.local:/volume1/homes
music -fstype=nfs,rw,soft,retry=0 mediastation.local:/volume1/music
video -fstype=nfs,rw,soft,retry=0 mediastation.local:/volume1/video
public -fstype=nfs,rw,soft,retry=0 mediastation.local:/volume1/public
The first elemen on each line is the name of the directory so, for example, /mnt/backups/
will mount to the backups share on the NAS whenever anything tries to access the folder on my machine. This is all kinds of seamless neat.
NOTE: mediastation.local
is in my hosts
file and points to the IP of my NAS.