v20 NFS4 with mySQL library database not working
#1
Hi there,
I'm a CoreELEC user and have using mySQL/MariaDB to share Kodi library database for a while. I recently moved to NFSv4, with following exports:
Code:
nu22xj:~ # showmount -e 10.1.20.62
Export list for 10.1.20.62:
/nfs4_exports 10.1.20.0/27
/nfs4_exports/mMusic 10.1.20.8,10.1.20.7
/nfs4_exports/mShows 10.1.20.8,10.1.20.7
/nfs4_exports/mMovie 10.1.20.8,10.1.20.7
/nfs4_exports/4kHDR 10.1.20.8,10.1.20.7

I changed to NFS4 (as opposed to default v3) in the settiing and since it’s NFS4, the sources (in sources.xml) are basically like this now:
Code:
<source>
  <name>Movies</name>
  <path pathversion="1">nfs://10.1.20.62/mMovie/Action_Adventure/</path>
  <path pathversion="1">nfs://10.1.20.62/mMovie/Charlie_Chaplin/</path>
  .......
  .......
  <path pathversion="1">nfs://10.1.20.62/mMovie/Western/</path>
  <allowsharing>true</allowsharing>
</source>

But when it rebuilds the DB, it’s getting all the path wrong:
Code:
MariaDB [(none)]> SELECT idPath,strPath,strContent FROM MyVideos131.path LIMIT 3 \G;
*************************** 1. row ***************************
idPath: 1
strPath: nfs://10.1.20.62/exPort/mMovie/Action_Adventure/
strContent: movies
*************************** 2. row ***************************
idPath: 2
strPath: nfs://10.1.20.62/exPort/mMovie/Bollywood/
strContent: movies
*************************** 3. row ***************************
idPath: 3
strPath: nfs://10.1.20.62/exPort/mMovie/Charlie_Chaplin/
strContent: movies 3
rows in set (0.001 sec)

It’s adding NFSv3 style `/exPort` after the nfs-server IP, which is the actual root directory for NFSv4 now and shouldn’t be in the path. Not sure how it's figuring out the server-side physical path but its invalid to a NFSv4 client, hence failling to payback any media at all.

Is  it a bug or am I doing something wrong here? Any help will be really appreciated.

-S
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply
#2
For my setup on Arch, my /etc/exports a little different
Code:
/srv/nfs         10.9.8.0/24(ro,fsid=root,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)
/srv/nfs/misc    10.9.8.0/24(ro,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)
/srv/nfs/music   10.9.8.0/24(ro,no_subtree_check,insecure,async,all_squash,pnfs,anonuid=99,anongid=99)

I also had to disable quite a few systemd services but your distro might be different....
Code:
gssproxy.service -> /dev/null
nfs-idmapd.service -> /dev/null
nfs-server.service -> /dev/null
rpcbind.service -> /dev/null
rpcbind.socket -> /dev/null
rpc-statd.service -> /dev/null
Need help programming a Streamzap remote?
Reply
#3
I'm running on Ubuntu 22.04 and I also have a very similar exports:
Code:
/nfs4_exports         10.1.20.0/27(ro,sync,no_root_squash,no_subtree_check,crossmnt,fsid=0)
/nfs4_exports/mMovie  10.1.20.7(ro,nohide,insecure,no_subtree_check,sync)
/nfs4_exports/mShows  10.1.20.7(ro,nohide,insecure,no_subtree_check,sync)
/nfs4_exports/mMusic  10.1.20.7(ro,nohide,insecure,no_subtree_check,sync)
where `/nfs4_exports` is the pseudo filesystem, where the real directories are mounted with the `--bind` option like this:
Code:
/exPort/mMovie  /nfs4_exports/mMovie  none bind 0 0
/exPort/mMusic  /nfs4_exports/mMusic  none bind 0 0
/exPort/mShows  /nfs4_exports/mShows  none bind 0 0
I don't think NFS4 itself is the problem but the way Kodi is dealing with it. In the BD library, the _path_ should be like
Code:
nfs://10.1.20.62/mMovie/Action_Adventure/
but it's using the v3 style path instead:
Code:
nfs://10.1.20.62/exPort/mMovie/Action_Adventure/
using physical path, which is invalid to NFS4 clients - that's my problem.
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply
#4
Did you set nfsv4 in Kodi's GUI?
Code:
% grep -i nfs /var/lib/kodi/.kodi/userdata/guisettings.xml 
    <setting id="nfs.version">4</setting>
    <setting id="nfs.chunksize" default="true">128</setting>
Need help programming a Streamzap remote?
Reply
#5
Yes, of course!
I did set it on the GUI: Settings / Services/ NFS Client (changed it back to V3 now, until this issue of mine is fixed)
NFS4 is working just fine on the Kodi box - I can brows the files, can play directly from directory etc. - but the issue is when in the Library mode, as the underlying source_path is worng, for a NFSv4 server, hence it cannot get to the media at all. As I mentioned in my original post: The path in mySQL DB is NFSv3 specific, which not gonna take you anywhere, if tried from a NFS4 client - and that's exactly is happening here. You probably not gonna see that if don't have library, remotely stroed in the BD.
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply
#6
The paths to access the files on the server changed but they remained the same in the library (table path as you found out).
I'm not aware of a function in Kodi for the mass update of existing paths of library items, but you could try an SQL script to update the prefix in the table.
Alternatively, it may be easier to work on the exported files of library export, then re-import.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
After moving to NFS4, I destroye Video and Music DB on the mySQL servder an let kodi to build from scratch. and even after, the path enrty in the DB table was NFS3 specific (like the ones in my post). Any idea how that could possiblly heppen?  That's where I'm mostly puzzled. I thought the access path, in the DB, comes from the entries in sources.xml?
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply
#8
You wrote "I destroyed Video and Music DB on the mySQL server and let kodi build from scratch"

But did you delete just the current version of the db, or also the older versions (ex. MyVideos130 and lower)?

If you didn't delete the older versions, Kodi will migrate the most recent older version to the current version, preserving the nfs3 paths that were in the older db, and you would not be starting from scratch.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
(2024-03-31, 04:43)CrystalP Wrote: You wrote "I destroyed Video and Music DB on the mySQL server and let kodi build from scratch"

But did you delete just the current version of the db, or also the older versions (ex. MyVideos130 and lower)?

If you didn't delete the older versions, Kodi will migrate the most recent older version to the current version, preserving the nfs3 paths that were in the older db, and you would not be starting from scratch.
ahhh......... okay, now that makes a lot more sense - I didn't destroy the lower version as I have another lower version of CoreELEC running. I'll destroy all and start fresh.
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply
#10
wow!! that worked. Was scratching my head my head ever since, thinking where the old path is coming from.
Thaks @CrystalP for pointing out.
MINIX NEO U22-XJ | Denon AVC-X3800H | KEF Q750 | KEF Q250c | KEF Q150 | KEF Q50a | KEF Kube 10 MIE | LG OLED65G16LA | CoreELEC
Reply

Logout Mark Read Team Forum Stats Members Help
NFS4 with mySQL library database not working0