I’ve followed this How To thread :
Mounting network shares with autofs (alternative to fstab) - Wiki / General - OSMC Forums
So I have these packages installed :
osmc@Shiriu:~$ apt list autofs
Listing... Done
autofs/oldstable 5.1.2-4 arm64
autofs/oldstable,now 5.1.2-4 armhf [installed]
As mentionned, I’ve edited the file sudo nano /etc/auto.master and added :
/- /etc/auto.nfs.shares --timeout 15 browse
so it look like :
# options are explicitly given.
#
#/net -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse
I’ve then edited the file /etc/auto.nfs.shares to only add one line :
/mnt/Videos 192.168.1.250:/volume1/Videos
Then I’ve restarted autofs with :
sudo systemctl restart autofs
I was then able to browse the mounted files with :
ls -lh /mnt/Videos
Nothing special here.
When I used the fstab mount, I would add this line to the /etc/fstab file :
192.168.1.250:/volume1/Videos /mnt/Videos nfs noauto,x-systemd.automount 0 0