NFS fstab and Kodi Library

Currently using Kodi’s built-in NFS capability to define my media sources, which are all on a NAS. All sources are scanned in the Kodi library and this is using a shared MySQL on the NAS.

If I switch to using fstab mounting under OSMC, will this force me to redo the library? It’s extensive and I would like to avoid that if possible.


You can do as @Tom_Doyle suggested, or if you have MySQL skills you could fix the paths permanently in the database. It’s not a difficult SQL query and you would only need to do it once.

Thanks to you both. Not a big fan of path substitutions, seems like an added complexity to be remembered in the future. I’ve done a SQL path replace before and it wasn’t as scary as it initially sounded like, but I’m not SQL savvy. I may just do a library export in Kodi and bite the bullet, drop the database and let it rescan. What could possibly go wrong… Lol.

But thanks, I mainly wanted to validate that there wasn’t some other magic available.


If your library isn’t huge, you could export to a text file, edit that file create a new database by imported the edited file. But the SQL to fix the path isn’t bad. Basically an update query like:

UPDATE path SET strPath = REPLACE(strPath, "nfs://old/path", "/new/path") WHERE strPath LIKE "nfs://old/path%";

should do the trick


Revisiting this topic and tinkering…

I have a couple Vero 4k units which we use for viewing media on TVs but also have one LibreELEC box that is headless and basically just exists to do regular library scans and clean-up.

Using the excellent How-to written by @Chillbo I easily mapped my NAS NFS share to \mnt\PASQUA and can now nicely add the various folders in that share as Video Sources.

Similarly (though different process) I’m able to map my NAS NFS share in LibreELEC, but it seems to force me to use \storage\PASQUA as a mount point. (I used the new method in the below guide)
LibreELEC Mounting Network Shares

Obviously the SQL database (based on the LibreELEC scans) will not work for the Vero 4k.

How best to make these paths the same?
\storage vs \mnt


Let me rephrase the question:

How BEST to make these paths the same?

Substitution is a quick and dirty kludge which would be required on all the Vero 4k units since it wouldn’t work on the LE one as its the library author. And at some point I’ll replace the LE machine with a Vero 4k, which would put me back in the same soup.


I don’t know what would stop you from mounting to /storage/PASQUA on the Vero devices.

Me either and that would be ideal, but I don’t know how to do it. I followed the How-to because it was very prescriptive and I only had to substitute the actual NFS share name and my desired mount name. But I don’t know what’s required to mount somewhere other than \mnt. Do I need to create a \storage folder first and where, or will it be automatically created? I see no \storage folder in OE it just seems to refer to the root or home directory (alongside standard folders videos, music, pictures etc).

Unlike in OSMC where the mount is under system\mnt, not alongside the \home movies, music, pictures etc.

I just don’t know how to accomplish it.


Then your BEST option is path substitution.

sudo mkdir /storage and then follow the how to steps and just follow every step replacing mnt with storage.

Yep, that’s all I needed. Logic dictated simply substituting the /storage for /mnt but I didn’t know if it would be auto-created (like the PASQUA part) or not.

My real concern was whether or not the final mounted location would match that of the LE system from a KODI perspective. But even though it’s accessed under LE from KODI as: “Browse, Home Folder, PASQUA” and from OSMC as: “Browse, Root Filesystem, storage, PASQUA” the resulting path to the various media sources under PASQUA have the same path: “/storage/PASQUA/Movies” etc…

So this will allow me to scan from the LE KODI in the SQL library and the media paths will be the same for OSMC KODI.

Much more elegant than path substitution, IMHO. Thanks @fzinken