xbmc's internal nfs client behaves strangely
#1
Hey peoples,

i've noticed that xbmc's internal nfs client behaves strangely at my setup.

my nfs server (its a linux server) is configured like this:

Code:
yoshi ~ # cat /etc/exports
# /etc/exports: NFS file systems being exported.  See exports(5).
/var/exports            192.168.1.0/24(rw,fsid=0,no_subtree_check,insecure,all_squash,crossmnt)
/var/exports/boot       192.168.1.0/24(rw,fsid=1,no_subtree_check,insecure,all_squash,crossmnt)
/var/exports/medien     192.168.1.0/24(rw,fsid=2,no_subtree_check,insecure,all_squash,crossmnt)
/var/exports/software   192.168.1.0/24(rw,fsid=3,no_subtree_check,insecure,all_squash,crossmnt)
/var/exports/unsortiert 192.168.1.0/24(rw,fsid=4,no_subtree_check,insecure,all_squash,crossmnt)
yoshi ~ # mount | grep /var/exports
/mnt/raid/merged/medien on /var/exports/medien type none (rw,bind)
/mnt/raid/merged/boot on /var/exports/boot type none (rw,bind)
/mnt/raid/merged/software on /var/exports/software type none (rw,bind)
/mnt/raid/unsorted on /var/exports/unsortiert type none

so i can mount on my linux clients the nfs like this:
Code:
mount.nfs4 yoshi:/medien /tmp/test/
everything works.

the problem is xbmc can't access /medien. but xbmc's internal nfs client works with /var/exports/medien. which is pretty strange because when i try to mount yoshi:/var/exports/medien via mount.nfs4 i get the following message:
Code:
peach chris # mount.nfs4 yoshi:/var/exports/medien /tmp/test/
mount.nfs4: mounting yoshi:/var/exports/medien failed, reason given by server: No such file or directory
(rw,bind)

So it looks like xbmc's nfs client ignores the fsid=0 thing which says /var/exports is the nfs root. (i always thought the mapping from / to /var/exports does the nfs server, but then i don't have a reason why xbmc wants to mount /var/exports/medien and it works)

my xbmc version is the Gotham branch from git compiled a few weeks ago

Is it possible to get xbmc's nfs client working with /medien ?
Reply
#2
libnfs(the lib xbmc uses for nfs) doesn't support nfsv4 or bind mounts.
Reply
#3
Pretty good example of a bad nfs setup if you ask me. (why all the indirection - just mount your stuff into /var/exports directly and export those - or just directly export /mn/raid/blah) . also i wouldn't export /var/exports and its subdirs - only export one (either only /export or all subdirs).

But maybe i am wrong and you are the first person which can really backup such a setup with benefits. I am all ears Smile
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
My Setup is the following:

my raid array is mounted on /mnt/raid
i've got the following folders on /mnt/raid:
fixed <- for music thats perfectly tagged, movies which are named properly and have a nfo, and sortert photos
unsorted <- for all the stuff thats not perfectly organized
sorted <- i move the stuff from unsorted, organize it and move it to sorted. from time to time the sorted stuff moves to fixed
merged <- is an aufs mount, which combines fixed and sorted. When i write something to merged, it gets written to sorted, but it shows everything combined from fixed and sorted.

so i could export /mnt/raid/merged with fsid=0, but then i had to get the unsorted folder in merged too, so i had to mount --bind it, and i don't know how aufs would react to it.

i also could export /mnt/raid/merged, and /mnt/raid/unsorted. thats what i've done bevore. but with this setup i couldn't use this nice fsid=0 setup where i just have to mount yoshi:/medien or yoshi;/unsorted. i would need either the full path or at least a merged bevor medien. mounting with full path was what i did before trying this mounting to /var/exports and exporting via fsid=0 thing

and mount --bind to /var/exports is the recommended way for setting up a nfs v4 server at least in the gentoo wiki

but i think as long as libnfs doesn't support nfsv4 i will just remove the fsid=0 and mount everything like yoshi:/var/exports/medien
Reply
#5
*tilt* Smile
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
xbmc's internal nfs client behaves strangely0