Autofs network drive mounting problem

Hi,

I am newby and readed a lot regarding autofs folder mounting. But as many I have problem when I try to mount the network NFS drive.

I have 2 sources (192.168.3.11 and 192.168.3.71), one network drive is created by Windows Server 2019 (.3.11), other is from QNAP NAS (.3.71).

The problem is that I can not mount folder to OSMC.

If I check the mounting options I get:
slika

How to aproch to solve mounting problem as this way I got, that folder do not exist:

/mnt/Torrent 192.168.3.11:/Torrent
tried also:
/mnt/Torrent 192.168.3.11:Torrent

and tried also:
sudo mkdir /mnt/Torrent
sudo mount -v -t nfs 192.168.3.11:/Torrent /mnt/Torrent

Any help appreciate.

In auto.master I added:
/- /etc/auto.nfs.shares --timeout 15 browse

So, there is:

+dir:/etc/auto.master.d
+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse

Hi,

Have you considered using samba/cifs for the Windows Share? There is no really benefit of using nfs over samba, when the server is Windows.

That said, what was the output of this command:-

Also after running this command what is out of:-

mount

Regards Tom.

login as: osmc
osmc@192.168.3.51's password:
Linux KodiKSLBE 4.9.269-50-osmc #1 SMP PREEMPT Mon Feb 5 00:33:51 UTC 2024 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Apr 18 08:23:55 2024 from 192.168.3.1
osmc@KodiKSLBE:~$ sudo mount -v -t nfs 192.168.3.11:/Torrent /mnt/Torrent
mount.nfs: mount point /mnt/Torrent does not exist
osmc@KodiKSLBE:~$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=1923744k,nr_inodes=480936,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/osmcroot on / type ext4 (rw,relatime,stripe=1024,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/debug type cgroup (rw,nosuid,nodev,noexec,relatime,debug)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/schedtune type cgroup (rw,nosuid,nodev,noexec,relatime,schedtune)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11375)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/tee on /tee type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=385428k,nr_inodes=96357,mode=700,uid=1000,gid=1000)
osmc@KodiKSLBE:~$

Should I tried this with firstly mkdir /mnt/Torrent ?

mkdir: cannot create directory ‘/mnt/Torrent’: Permission denied
osmc@KodiKSLBE:~$ sudo mkdir /mnt/Torrent
osmc@KodiKSLBE:~$ sudo mount -v -t nfs 192.168.3.11:/Torrent /mnt/Torrent
mount.nfs: timeout set for Thu Apr 18 10:11:09 2024
mount.nfs: trying text-based options ‘vers=4.2,addr=192.168.3.11,clientaddr=192.168.3.51’
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options ‘vers=4.1,addr=192.168.3.11,clientaddr=192.168.3.51’
osmc@KodiKSLBE:~$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=1923744k,nr_inodes=480936,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/osmcroot on / type ext4 (rw,relatime,stripe=1024,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/debug type cgroup (rw,nosuid,nodev,noexec,relatime,debug)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/schedtune type cgroup (rw,nosuid,nodev,noexec,relatime,schedtune)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=11375)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/tee on /tee type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=385428k,nr_inodes=96357,mode=700,uid=1000,gid=1000)
192.168.3.11:/Torrent on /mnt/Torrent type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.3.51,local_lock=none,addr=192.168.3.11)
osmc@KodiKSLBE:~$

192.168.3.11 is Windows 2019 Server share…

This is for 192.168.3.71

And what is the content of
/etc/auto.nfs.shares

1 Like

In /mnt/ folder I see now “Torrent” which is populated with correct file/folder list:
slika

But I can not find file “auto.nfs.shares”… so maybe this is the problem that sharing folder is not seen in Kodi player…

Also tried with other network (nfs) shares (different IP source in network) and all folder are normally populated with correct filelist/sub-folders…

slika

So problem is probably that “/mnt” is somehow not visible in Kodi - maybe related with missing file “auto.nfs.shares”?

And after device reboot folders are empty…

please check this article:

this might bring you closer to a solution and where to find the needed files.

You would need to create it with the respective content.
As @mtv wrote please check the respective Wiki for details.
After you have successfully mounted you then also need to add it as as a source to scan it into Kodi.

Because you manually mounted and not with the respective autofs commands.

Great info…

I missed:

sudo nano /etc/auto.nfs.shares

Then I added:

/mnt/Torrent 192.168.3.11:/Torrent
/mnt/Risanke 192.168.3.71:/Multimedija2/VIDEO/RISANKE
/mnt/Nadaljevanke 192.168.3.71:/Multimedija2/VIDEO/NADALJEVANKE
/mnt/Video 192.168.3.71:/Multimedija/VIDEO
/mnt/Audio 192.168.3.71:/Multimedija/AUDIO

And after reboot I see files in /mnt/**** folder…

Now the last problem is how to add this sources to the Kodi player (because it does not populate it as sources - Auto-mounted drives).

slika

Aham… Found solution and add local folder in Kodi under “/mnt/***” as Kodi source and it’s working…

I hope that this is correct way?

:slight_smile:

Not a real problem.

Go to Settings, Media, in the library part choose video and add it but search local to /mnt and then select the source you want to add.

See for more info below wiki

https://kodi.wiki/view/Adding_video_sources

Yea… I did exactly that way… so I make the correct way… thank you for your support :+1: