Android Issues with NFS on Android? Possible bug?
#1
I have a NAS which I use to serve media. I share a folder using NFS.
All my XBMC machines (Desktop, Raspberry Pi etc) can see the folder and subfolders just fine. But my Android devices cannot.

I've tested on a Tablet (4.1.2) and a Note 3 (Cyanogenmod 4.4.4) and both exhibit the same problem. Installed the latest version of the ARM XBMC build.

I go to add source, click on NFS. the IP address of my server is automatically discovered. Clicking on that shows my shared folder. However, I cannot traverse any further than that.

I've tried manually entering the full path, adding in Videos rather than file manager. Nothing. It just doesn't let me select it.

Is this a known bug? Can I get some debug logs to see what's going on? Anyone else experience this?
Reply
#2
(2014-07-18, 22:10)edent Wrote: I have a NAS which I use to serve media. I share a folder using NFS.
All my XBMC machines (Desktop, Raspberry Pi etc) can see the folder and subfolders just fine. But my Android devices cannot.

......

Is this a known bug? Can I get some debug logs to see what's going on? Anyone else experience this?

I am facing the same issue. I think it might due to NFS authentication. NFS uses uid for authentication. In linux, like rpi, your uid and gid is probably 1000. On android, it is probably 10056.

I guess it might be solved by creating a user on NFS server with uid gid 10056, and adding permission to the shared directory.
Reply
#3
just map all uids to one uid on the nas should do the trick aswell... (and grant permissions to the NAS-side uid to the exported files/dirs of course).
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
As ever, it pays to RTFM :-)

Specifically http://wiki.xbmc.org/?title=NFS#NFS_sharing_from_Linux

The options need to include
Code:
(rw,all_squash,insecure)

It was the "insecure" which was tripping me up.
Reply
#5
ha - good news 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
#6
(2014-07-21, 20:59)edent Wrote: As ever, it pays to RTFM :-)

Specifically http://wiki.xbmc.org/?title=NFS#NFS_sharing_from_Linux

The options need to include
Code:
(rw,all_squash,insecure)

It was the "insecure" which was tripping me up.

"insecure" let me go one step further. However, my android device cannot see cross-mount items. "crossmnt" works for rasberrypi, but not for android.
Reply
#7
whats crossmnt
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
#8
(2014-07-24, 11:19)Memphiz Wrote: whats crossmnt

Suppose you bind mount a (already mounted) directory under one of your nfs mount point, then you need "crossmnt" option in /etc/exports.
Reply
#9
sorry for digging out this thread, but I'm facing a similar issue and I'm making an heavy use of crossmounts (mainly because I'm using mhddfs to aggregate multiple disks in /mnt/pool first, then bind-mounting the subfolders elsewhere)

Working ok on Openelec, but failing on my Shield TV.

Though, for one of my subfolders, it works... and that's the only mount point which is not mounted by systemd (I had dependencies problems to mount my mhddfs array)

So, to explain my setup:
/mnt/ssd (contains Home & Photos folders - mounted with fstab)
/mnt/snapraid[1-3] (mounted with fstab)
/mnt/pool (mhddfs array of the previous, contains Musique & Vidéos folders - mounted with systemd)

Then I mount-bind the subfolders under /media
/media/Photos <-- /mnt/ssd/Photos
/media/Musique <-- /mnt/pool/Musique
/media/Vidéos <-- /mnt/pool/Vidéos

and my exports file:
/media *(fsid=0,rw,sync,crossmnt,no_subtree_check,insecure,root_squash,nohide)
/media/Photos *(fsid=1,rw,sync,no_subtree_check,insecure,anongid=100,anonuid=1001,all_squash,nohide,crossmnt)
/media/Vidéos *(fsid=2,rw,sync,no_subtree_check,insecure,anongid=100,anonuid=1001,all_squash,nohide,crossmnt)
/media/Musique *(fsid=3,rw,sync,no_subtree_check,insecure,anongid=100,anonuid=1001,all_squash,nohide,crossmnt)

This setup works with Kodi in Openelec (and linux distros more generally) but not with Kodi in Android (Shield TV & S5).

I'm a bit at a loss. Permissions are of course ok. Any clue is welcome!
Reply
#10
Looking closer, I'm thinking that it could be related to the fact that it's a fuse-based mount which is being accessed from a non-system port (above 1024).

Any clue?
Reply
#11
Here I've written about the same problem: http://forum.kodi.tv/showthread.php?tid=252717, but still no decision.
Reply
#12
I just tested it and it works for me. I have Kodi 16 Beta 4 running on Shield TV.
The server is Ubuntu Server 12.04.5
My /etc/exports is
Code:
/data/Videos        {ip-of-shield}(rw,no_subtree_check,all_squash,insecure,anonuid=1001,anongid=1002)
/data/Movies        {ip-of-shield}(rw,no_subtree_check,all_squash,insecure,anonuid=1001,anongid=1002,fsid=1)
/data/Videos is a normal directoy. /data is a bind mount from /mnt/data-raid/data.
/data/Movies is a bind mount from /mnt/mhddfs_movies, which is mhddfs from /mnt/data2/movies/ and /mnt/data3/movies
The mhddfs is mounted like this in /etc/fstab:
Code:
mhddfs#/mnt/data2/movies,/mnt/data3/movies    /mnt/mhddfs_movies    fuse    default_permissions,allow_other    0    0
Reply
#13
Thanks wweich. Glad to see some others are using the same setup as me Smile

Unfortunately for me it doesn't work. I had hope with the default_permissions flag but to no avail.

the group from anongid is of course allowed to read the folders...

Could it be because I'm mount-binding subfolders of a mount (I removed the crossmnt & nohide flags from my export).

Could you show the numerical ownerships of your /data folder?

(Btw since then I replaced mhddfs by mergerfs)
http://zackreed.me/articles/92-mergerfs-...raid-disks

update: in my server logs I could read this:
Dec 28 21:54:51 server rpc.mountd[1087]: authenticated mount request from 192.168.0.104:49646 for /media/Musique (/media/Musique)

so it must be a configuration/rights issue... or a race condition.
Reply
#14
Ownership of /data is uid=1000,gid=1002. Permissions are drwxr-xr-x.
I never used the crossmnt option. When I tried to share /data with NFS I exported every bind mounted sub folder separately.
Reply
#15
Ok thanks.

So now if I share directly "/media/Vidéos/Films" (one of the subfolders of Vidéos) from the server, I can see the files in there.

They are all displayed with a size of 0, a date of 1970, etc. etc. but I can play them fine (but I can't scan the folder).

I can also add "/media/Vidéos" in the file browser under System, and there I can see the subfolders (Films among them) with a size (or whatever that is) of 0, and I can create folders also.
The folder created from Kodi has the expected permissions (the one from anongid & anonuid) on the server, but is none-the-less shown with a size of 0.

So I'm a bit at a loss... Will try with Jarvis Beta 4.

Nope, same with Kodi Jarvis B4.
Reply

Logout Mark Read Team Forum Stats Members Help
Issues with NFS on Android? Possible bug?0