Empty directory when adding NFS share

I am stuck trying to get a NAS directory to show all its media files on my OSMC Kodi on a Pi3+… I am a newbie and haven’t any experience programming.

I have followed the instructions on this page “Configuring fstab based share mounts” by Wuschel_Wuschel (Configuring fstab based NFS share mounts) and it works well up to the point where I use:

cd /mnt/Server_Movies (in my case “cd/mnt/Filmer”)

and then listing the content (ls)…

I am in the directory but it shows up as empty. I also tried the suggested following:

sudo mount /mnt/Server_Movies (in my case “sudo mount /mnt/Filmer”) but no change.

In “reality” the directory Filmer contains about 280 sub directories with movies in each of them, but no directory show.

I also tried to put a file directly in the directory Filmer but that doesn’t show up either. I have used samba and it finds all the movies, but someone told me that NFS would be more reliable and faster, that’s why I am attempting this…

Any suggestions? Thank you in advance!"

Show the URL of mount | paste-log

Hi fzinken! Thank you, it’s:

https://paste.osmc.tv/oqadafipos

You mounted it as follows
192.168.0.105:/i-data/923cadb3/nfs/Filmer on /mnt/MoviesGurresta

so ls -lah /mnt/MoviesGurresta should show you the contens

ls -lah /mnt/MoviesGurresta gives the answer:

total 8.0K
drwxrwxrwx 2 root root 4.0K Aug 4 19:47 .
drwxr-xr-x 5 root root 4.0K Aug 10 11:07 …

and no more…

Hi,

systemd-1 on /mnt/Filmer type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
192.168.0.105:/i-data/923cadb3/nfs/Filmer on /mnt/Filmer type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.105,mountvers=3,mountport=40524,mountproto=udp,local_lock=none,addr=192.168.0.105)

systemd-1 on /mnt/MoviesGurresta type autofs (rw,relatime,fd=54,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
192.168.0.105:/i-data/923cadb3/nfs/Filmer on /mnt/MoviesGurresta type nfs 

You seem to be trying to mount the same share to 2 different mount points, could you please provide the urls for the following:

cat /etc/fstab | paste-log

&

showmount -e 192.168.0.105 | paste-log

Thanks Tom.

1 Like

Hi Tom!

https://paste.osmc.tv/qeyidobofo

https://paste.osmc.tv/afayaxetam

Yes, I first tried with Filmer, and when it didn’t work I thought I would try with another name of the mount than the actual name (Filmer) on the NAS…

Hi,

The fstab entry is now only shows one nfs entry, have you changed fstab since following:

Either way could you please try a reboot and then provide the url from:

grab-logs -A

Thanks Tom.

Yes, I got rid of my earlier attempts with other names…

Here is the log

https://paste.osmc.tv/fosegiboru

Thanks Tom!

Hi,

Ok looks good now, do you see any files if you issue:

ls -lah /mnt/Filmer

Thanks Tom.

Hi Tom.

Should it take “forever” to have the results from:

ls -lah /mnt/Filmer

?

Thanks Eric

Hi,

Do you get an error if you issue:

sudo mount /mnt/Filmer

If so please post the error here.

If not try ls -lah /mnt/Filmer again.

If you get you get your listing, just make sure wait for network is enabled in myosmc and it should work on boot.

Thanks Tom.

It seemed to have lost connection so I did a reboot. After having stopped a job (?) it rebooted. Then I tried this:

osmc@PiMEDIA:/$ sudo mount -v /mnt/Filmer
mount.nfs: timeout set for Fri Aug 10 13:49:55 2018
mount.nfs: trying text-based options ‘vers=4.2,addr=192.168.0.105,clientaddr=192.168.0.119’
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options ‘vers=4.1,addr=192.168.0.105,clientaddr=192.168.0.119’
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options ‘vers=4.0,addr=192.168.0.105,clientaddr=192.168.0.119’
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options ‘addr=192.168.0.105’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.0.105 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.0.105 prog 100005 vers 3 prot UDP port 40524
mount.nfs: mount(2): Device or resource busy

Now I just did this again, as you suggested:

osmc@PiMEDIA:/$ sudo mount /mnt/Filmer
osmc@PiMEDIA:/$ ls -lah /mnt/Filmer
totalt 8,0K
drwxrwxrwx 2 root root 4,0K aug 4 19:47 .
drwxr-xr-x 5 root root 4,0K aug 10 11:07 …

So no change I guess…

Thanks Eric.

Hi Eric,

Are you sharing this from a NAS or a PC, some details about device would help:

So if its a nas, make a model
if its PC/server - os

Thanks Tom.

Hi again,

It’s from a NAS, the Zyxel NAS326. There is a directory there (under root) called ‘video’. There I have some movies in different directories.

I have specified a network share - enabled a NFS share of the directory ‘video’ with the * as user (meaning that it will allow all users within the network to have Read/Write access.

The NAS software gives - for that directory - the names:

NFSv3 Path: /i-data/923cadb3/nfs/Filmer
NFSv4 Path: /Filmer

I choose to use the v3 path in my /etc/fstab:

192.168.0.105:/i-data/923cadb3/nfs/Filmer /mnt/Filmer nfs x-systemd.automount,noauto,ro

Thanks Eric.

Hi,

Adding the nfs version to fstab may help:

192.168.0.105:/i-data/923cadb3/nfs/Filmer /mnt/Filmer nfs nfsvers=3,x-systemd.automount,noauto,ro

Then I recommend a reboot.

Thanks Tom.

Hi Tom,

Nope, that didn’t change anything - still empty…

Thanks Eric.

It’s really strange - I tried to enable the share of another folder on my NAS - a directory called "nfs’. I put just a document in it and made the same settings for that on the NAS settings. Then I mounted it in the /etc/fstab exactly as the previous one, but of course with reference to nfs instead of video. And that worked…

I’m restarting from the beginning now, with a clean install of OSMC and Kodi and I will try again…

Hi,

If Zyxel NAS326 shows a nsfv4 path, you could try that using either the 2 below:

192.168.0.105:/Filmer /mnt/Filmer nfs nfsvers=4,x-systemd.automount,noauto,ro

or

192.168.0.105:/Filmer /mnt/Filmer nfs4 x-systemd.automount,noauto,ro

Thanks Tom.

Hi Tom,

Well I can’t explain it, but I restarted from the beginning and found one solution working…

On the NAS, I had to enable NFS sharing but not specifying any directory to share in the NFS service, only as a shared folder.

Then for some reason only one directory worked with content and that was one called nfs (directly in root). When I moved all movies (and sub directories) there it works.

So with the…

192.168.0.105:/i-data/923cadb3/nfs /mnt/Filmer nfs nfsvers=3,x-systemd.automount,noauto,ro

…it works and I can find everything with:

ls /mnt/Filmer

Exactly the same line but pointing at another directory on the NAS (parallel to the nfs) doesn’t work.

Thanks for all your help!

Eric