Kodi Community Forum
Problem with symlinks on NFS share - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Problem with symlinks on NFS share (/showthread.php?tid=348770)



Problem with symlinks on NFS share - Uatschitchun - 2019-10-27

Hi there. Been using Kodi with NFS shares since ever.

As I'm re-organizing my media, I wanted to centralize my .actors folder into only one. Idea is to have one folder containing Actor images and link this folder into every movie folder as .actors.

As I'm experimenting, I noticed that linked folders aren't recognized by kodi!

For instance:

/movies/MovieA
/movies/testdir/MovieB
/movies/testdir/MovieA (link to /movies/MovieA)

If I add /movies/testdir via Kodi, it adds the MovieB, but not MovieA, no matter if it's a relative link (../movieA) or a full link (/movies/movieA)

So it's not possible to symlink the centralizes Actors folder into the movie dirs, as it's not recognized then ;(

What works is to add a .actors folder into each movie folder and add the actor images as links!

So, linking folders doesn't work, but linking files!? Am I'm missing something?

I'm using kodi's NFS feature from "add sources"

Any idea on this?

The export is working well. kodi has full access, as I'm able to export to the share from media settings, too.


RE: Problem with symlinks on NFS share - fritsch - 2019-10-27

Works as intended. Imagine what that would mean if nfs would follow symlinks?

More background: https://unix.stackexchange.com/questions/135048/how-to-follow-symlinks-in-nfs


RE: Problem with symlinks on NFS share - asavah - 2019-10-27

There is one approach that I use and it actually works.
The trick it that paths on the server and on the client are identical.
This works only when using fstab (os) mounts, not with libnfs.

Edit: I higly recommend using fstab mounts on linux systems and then adding media sources to Kodi as if they were local.
Libnfs is great for systems that lack proper nfs support (eg windows, android), but for linux IMO it's better to use native support.

On my server I have a LVM volume, let's call it "storage".
What I do is I mount it on /media/nas mountpoint on my server and then export /media/nas via nfs to my network.
On clients I mount myserver:/media/nas on local mountpoint /media/nas .
This way absolute and relative paths are identical from both server and client POV.


RE: Problem with symlinks on NFS share - Uatschitchun - 2019-10-28

Thx for your answers, but I don't get it Wink

The symlinks are relative symlinks not crossing shares or filesystems.

Here's the /etc/exports:
Code:
/media         1.2.3.4/24(rw,sync,root_squash,no_subtree_check,fsid=0,insecure)
/media/movies  1.2.3.4/24(rw,sync,root_squash,no_subtree_check,insecure)
And the mount is:
Code:
/dev/sdb1 on /media/movies type ext4 (rw,relatime,stripe=8191)
So I've got the following folders:
Code:
/media/movies/Actors
/media/movies/MovieA
and a relative symlink to 'Actors' in /media/moviesA/
Code:
.actors -> ../Actors/

This all works very nicely, when pointing Kodi to the folder the client mounts the share to, but it's not working, if I use Kodi's libnfs.
In case of using libnfs there are no actor images showing up, in case of using the filesystem mount, the actor images are present.

So it's a limitation/restriction in libnfs?! Wanted!? Workaround?!


RE: Problem with symlinks on NFS share - Uatschitchun - 2019-10-29

As symlinks are working if I use a mounted share from within Kodi and not Kodi's libnfs, my question is:

Is it a known and wanted limitation of the libnfs implementation or a bug?