nfs in libreelec

  • Hello i'm using libreelec and i have a problem using nfs

    the hardware i'm using is a raspberry pi 3 b

    i have a server with fedora 24, and with a raid of four drives where i like to put my videos

    if i mount the directory in another linux i have no problem (i have problems with the speed but i know that here i'm posting only the problems with libreelec)

    the raspberry and the fedora server are in the same network,

    i can put the nfs drive but the libreelec don't seem to see the files¿?

    i'm using the info put in NFS - Official Kodi Wiki to configure the nfs server

    It's something like that i'm using my memory this afternoon i can put the exact line:/mnt/Cyberdojo 192.168.1.0(rw,all_squash,insecure,anonuid=1000,anongid=1000)

    i'm not sure if a need the id of 501 if a put the anonuid=1000 and the anongid=1000

    anybody is using nfs or i can do better?¿?¿?

  • could you please show us the exports file on your nas under /etc via: cat /etc/exports (if it's located there...on most NASs I know of, it's there).

  • Are you sure you meant to restrict access to 192.168.1.0 - that's likely to be an unusual IP address for a LibreELEC client (more likely to be the IP address of your router/gateway). Or did you mean to grant access to the entire subnet, ie. 192.168.1.0/24 in which case you're missed off "/24".

    Does the user on your Fedora system have id 1000? What user owns the files in the share, and when logged in as this user on Fedora what is the output of the "id" command?

  • this afternoon i will put the exact line in my /etc/exports

    i'm thinking that perhaps is 192.168.1.0/24 my ideas is that i will grant anybody in the range 192.168.1.x to get the nfs shares

    i have two fedora a server that is the nas and a client that is my workstation
    in the two i have a user that his uid=1000
    my idea is that normaly this user will put the videos, and read the videos

    i prefer that the libreelec to get only read permisions, ¿it's viable or the libreelec have to put/write files in the nfs shares?

    i think that i don't have a user mobile in the fedora server uid=501.... perhaps the problem comes from this¿?

    Edited once, last by kapoira (July 27, 2016 at 12:54 PM).

  • Read only is possible, just configure the NFS export with the "ro" setting. Based on your configuration, the problem is most likely that you've granted access to the wrong IP address.

    If you continue to have problems, post your /etc/exports file, and a link to your full Kodi debug log (use a pastebin site for the debug log, then paste a link).

  • my /etc/exports

    /mnt/Cyberdojo 192.168.1.0/255.255.255.0(rw,all_squash,insecure,anonuid=1000,anongid=1000,sync)


    and when i search for a nfs share i don't see any, when i put 192.168.1.2/mnt/Cyberdojo to try it, i don't see any....

    If you have an idea please tell me and i will try it ;)


  • /mnt/Cyberdojo 192.168.1.0/255.255.255.0(rw,all_squash,insecure,anonuid=1000,anongid=1000,sync)

    Why don't you use 192.168.1.0/24 as it says in the Wiki?

    I'm not sure if 192.168.1.0/255.255.255.0 will work - what that says to me (and it's only used in a comment) is a network 192.168.1.* configured with mask 255.255.255.0 - not that you should configure the export in that way. I could be wrong, so someone else may have to advise.

    And if you want a read-only export, change "rw" to "ro".


    and when i search for a nfs share i don't see any, when i put 192.168.1.2/mnt/Cyberdojo to try it, i don't see any....

    Not all NFS servers advertise their shares in a way that is compatible with Kodi, unfortunately. My ReadyNAS NFS server would advertise it's shares (I think because it runs a Rendezvous service) but my FreeNAS NFS server does not, so when setting up my FreeNAS NFS shares I simply typed them in and didn't bother trying to navigate using the folders when adding the source in the GUI.

    Also, you did restart your NFS server after adding the new share? Some servers/services may need this.

    This is how my FreeNAS NFS source looks to me in Kodi:

    Once the source is added it's possible to navigate the NFS share in Files, or scan the library (in my example above, all sub-folders/directories below the media folder are accessible to Kodi).

    Edited once, last by milhouse (July 27, 2016 at 5:33 PM).

  • sorry, but no good news....

    kodi.log - Pastebin.com

    is in the kodi.log


    16:42:36 21.855177 T:1962041344 ERROR: GetDirectory - Error getting nfs://192.168.1.2/mnt/Cyberdojo/
    16:42:36 21.856953 T:1962041344 ERROR: CGUIMediaWindow::GetDirectory(nfs://192.168.1.2/mnt/Cyberdojo/) failed
    16:42:46 32.090134 T:1962041344 ERROR: Window Translator: Can't find window pvr
    16:42:55 40.928848 T:1602622368 ERROR: Unable to lookup host: ''
    16:42:58 43.952068 T:1962041344 ERROR: GetDirectory - Error getting nfs://
    16:42:58 43.952274 T:1962041344 ERROR: CGUIDialogFileBrowser::GetDirectory(nfs://) failed
    16:43:03 48.834946 T:1962041344 ERROR: GetDirectory - Error getting nfs://

    and the new /etc/exports is:

    /mnt/Cyberdojo 192.168.1.0/24(rw,all_squash,insecure,anonuid=1000,anongid=1000,s
    ync)

    in the fedora client i can put the line

    sudo mount -o sync,noac -t nfs4 192.168.1.2:/mnt/Cyberdojo /mnt/Cyberdojo

    and the directory mounts,......

  • Something is messed up. Run the following:

    Code
    cat /storage/.kodi/userdata/sources.xml | pastebinit


    and paste the link.

    Note that the libnfs library used by Kodi to access NFS filesystems does not support NFSv4 so you'll need to ensure you have an NFSv3 server, otherwise you'll have to use OS NFS mounts in LibreELEC.


  • Something is messed up. Run the following:

    Code
    cat /storage/.kodi/userdata/sources.xml | pastebinit


    and paste the link.

    Note that the libnfs library used by Kodi to access NFS filesystems does not support NFSv4 so you'll need to ensure you have an NFSv3 server, otherwise you'll have to use OS NFS mounts in LibreELEC.

    FOWP

    and i think that i have installed the nfs for v3 and for v4 but i will check tomorrow afternoon

  • i'm trying to do a ssh and trying to mount the nfs and says to me:

    mount -o ro,sync -t nfs 192.168.1.2:/mnt/Cyberdojo /var/media/pp/
    mount: RPC: Remote system error - No route to host
    mount: mounting 192.168.1.2:/mnt/Cyberdojo on /var/media/pp/ failed: Bad file descriptor

    ping 192.168.1.2
    PING 192.168.1.2 (192.168.1.2): 56 data bytes
    64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.528 ms
    64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.405 ms
    64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.381 ms


    Have any idea to configure my nfs share to mount it.....

  • Following works for me with FreeNAS:

    Code
    NFSOPTS=nfsvers=3,rw,intr,noatime,rsize=32768,wsize=32768,nolock,async,proto=udp
    [ ! -d /storage/freenas ] && mkdir /storage/freenas
    [ ! -d /storage/data ]    && mkdir /storage/data
    mount -t nfs 192.168.0.3:/mnt/share /storage/freenas -o $NFSOPTS
    mount -t nfs 192.168.0.3:/mnt/share/data  /storage/data -o $NFSOPTS
  • ok i think that i have nfs server 3 and 4 but i don't know why ¿a firewall? is blocking the nfs3

    rpcinfo -p
    100000 4 udp 111 portmapper
    100000 3 udp 111 portmapper
    100000 2 udp 111 portmapper
    100024 1 udp 33497 status
    100005 1 udp 20048 mountd
    100005 1 tcp 20048 mountd
    100024 1 tcp 45229 status
    100005 2 udp 20048 mountd
    100005 2 tcp 20048 mountd
    100005 3 udp 20048 mountd
    100005 3 tcp 20048 mountd
    100003 3 tcp 2049 nfs
    100003 4 tcp 2049 nfs
    100227 3 tcp 2049 nfs_acl
    100003 3 udp 2049 nfs
    100003 4 udp 2049 nfs
    100227 3 udp 2049 nfs_acl
    100021 1 udp 42433 nlockmgr
    100021 3 udp 42433 nlockmgr
    100021 4 udp 42433 nlockmgr
    100021 1 tcp 38161 nlockmgr
    100021 3 tcp 38161 nlockmgr
    100021 4 tcp 38161 nlockmgr

    yo can see the nfs 3 and 4 in the 2049 port

    the libreelec have and option to nfs4 ¿? thanks in advance

  • i have try one thing.

    In the raspberry i have put raspbian configure the ip to be the same of kodi
    and i can type to mount the nfs share and i can see the directories

    the problem is not the ip, not the server, it's seems that the rapbian that includes the libreelec. i'm in the beta New LibreELEC.tv Krypton build #0730

    it's seems that the network in the raspbian not have something or configure something..... i will try to see the problem.....