NFS FSTAB Mounts - takes forever to display on 'Videos' page

Hi all.

Hopefully my last small bug I need fix on my Vero. I have 6 drives mounted on my Vero, all via NFS FSTAB. They work fine, when I need to access them it’s no problem, the content plays as expected. I have a number of 4k movies on this server so use NFS FSTAB mounts for the more efficient throughput vs Kodi mounts.

Only 2 of the drives would be present at boot time as the other 4 are in an offline server I only switch on when we’re going to watch something. Generally this isn’t;t an issue but if I need to reboot the Vero for any reason the ‘Media Sources’ section on the ‘Videos’ page just gives me a spinning wheel with no drives accessible for several minutes - I’ve not timed it exactly but would say it’s at least 15+ minutes.

I’d like to remove the wait time as it saves me from using the less efficient NFS mounts via Kodi.

Is it just a case of adding something like ‘nofail,x-systemd.device-timeout=10s’ to the relevant lines or is there something else I should be doing?

Apologies if something like this has already been posted/resolved, I couldn’t find it.


You can use autofs instead of the fstab to mount NFS storage, on-demand. The options and performance at the same as mounts via fstab, but the configuration on the client-side is slightly more complex.
The /etc/auto.master file needs this line:
/- /etc/auto.nfs --timeout=60 --ghost

The /- simplifies the way mount points are found in the auto.nfs file.
The --ghost option means the directory where the mount will happen shows up even when the storage isn’t mounted.

The /etc/auto.nfs file needs 1 line for each mount, something like this:
/misc/D5 -fstype=nfs,soft,intr,rw,_netdev,async,vers=3 istar:/misc/D5

This assumes that the Kodi machines can find “istar” using the name. An IP address works there just as well.
I mount the storage to the same location on the source and from any client machines. Helps prevent me from being confused. I have D1, D2, D3, D4, … mounts too. Soft will help performance, but don’t use it for DBMS files. Also, if you want read-only mounts, just change the rw to ro in the options.
Forcing NFSv3, greatly simplifies
After everything is setup, just restart or reload the autofs service on the client.

The server-side runs the normal NFS server and is configured exactly the same as for any other client.

1 Like

Note that if you use this option, make sure that you don’t have Kodi set to automatically update your library at startup. It will see the empty directory and think all the media has been deleted.

1 Like

Ok thanks. So essentially, remove the mounts from fstab but add to autofs instead?

The offline drives I’ll be moving contain my library (using emby, path substitution) so I guess as long as mount in autofs the same drives/order as current fstab it should all be smooth sailing.

Yes, remove the drives from fstab. As to mount order, use the drives UUID or the partition label will ensure that the drives mount in the proper folder. Trying to use the device (/dev/sdX) is not reliable as the drives are not guaranteed to always spin up in the same order. This is also true for fstab.

1 Like

Thanks all. Not had much time to look at this but will hopefully do so over the weekend.