Autofs and mysql

#1

Hi, I have a Vero 4k+ with autofs NFS mounts. I have a second intel NUC Kodi client running latest version of LibreElec. Mysql works fine on both clients when using the NFS within Kodi however when I use autofs the NUC shows the mysql database but it does not show any artwork and when a movie is selected it says it is no longer in the library and will not play.
Any suggestions would be appreciated.

#2

Either use autofs on both devices with same mounting point or use path substitution

#3

I tried using autofs on LibreElec but it wouldn’t work using this guide:

Could you please let me know how I go about using path substitution on the NUC. Thanks

#4

https://kodi.wiki/view/Path_substitution

#5

Thanks for the info! I’ve had a read of the link you sent and also done some digging on google and various forums. However I am still unsure what to add to following text in advanced setting.xml:

<pathsubstitution>
  <substitute>
    <from>special://profile/sources.xml/</from>
    <to>NFS://YOUR_NETWORK_SHARE/Kodi/userdata/Thumbnails/</to>
  </substitute>
 </pathsubstitution>

My mount in autofs is:
/mnt/NAS/Trailers 192.168.1.11:/Media/Videos/Movies/Trailers

Could you please give me an example of how I would add this to the advancedsettings.xml

Also do I apply the above text in the advancedsettings.xml file for all Kodi clients on the LAN?

Thank you!

#6

You can’t share thumbnails that way anymore in Kodi V18. (And it never worked well in V17)

As to your media, something like this:

<from>NFS://192.168.1.11/Trailers</from>
<to>/mnt/NAS/Trailers</to>

The from line needs to match the source on the system that does the library scraping.

#7

Sorry I should of deleted the thumbnails bit, I just copied that from Kodi wiki as an example. I’m not interested in the thumbnails…just trying to get mysql to work properly with autofs.

The OSMC uses autofs however my other LibreElec client doesn’t allow the use of autofs.

When you say the ‘from line needs to match the source’, do you mean the i.p address should be that of the OSMC device running autofs or of the NAS that holds all the media?

Thanks

#8

What system do you normally run the library scan from? Thats the system that the from line needs to match. Can you share the sources.xml from that system (not from the system using autofs).

#9

I use the NUC to do the scraping as it’s faster. Please see link below for sources xml for NUC:

https://paste.osmc.tv/gehojijaxi.xml

#10

With that as the source, your path substitution on the 4K should look like:

<from>nfs://192.168.1.11/Media/Videos/Movies/Trailers/</from>
<to>/mnt/NAS/Trailers/</to>
#11

Ok thanks I’ll give that a try.

For future reference…if the Vero’s i.p is 192.168.1.12. and I was to setup autofs on the Vero and also use the Vero for the library scan what would the path substitution look like then in the advancedsettings.xml on the NUC?

#12

You would just swap the to and from lines. Don’t change the IP to the 4Ks IP in the substitution.

#13

So the i.p is always the location where media is stored… in this case my NAS (192.168.1.11)

#14

Correct.

#15

So it would look like this?

<from>nfs://192.168.1.11/mnt/NAS/Trailers/</from>
<to>/Media/Videos/Movies/Trailers/</to>
#16

On what system? That’s how it will look on the 4K. You would swap the from and to lines on the NAS if you did the library scan on the 4K.

#17

The advancedsettings.xml on the NUC running LibreElec. With the Vero setup with autofs and also running the library scan. Mysql running on the NAS and advancedsettings.xml of all kodi clients.

#18

Like I keep saying, reverse the from and to lines on the NUC.

<from>/mnt/NAS/Trailers/</from>
<to>nfs://192.168.1.11/Media/Videos/Movies/Trailers/</to>
#20

I got confused when you said NAS

#21

I managed to get it working…thank you to all for your help!