FreeNAS NFS Share to raspberry pi (raspbmc)

Soldato
Joined
14 Mar 2011
Posts
5,442
Hey all,

Couldn't decide if this was better in the Linux subforum or this one, so if I picked wrong and a mod wants to move it then please feel free to do so :D

I've setup a test install of the latest FreeNAS on my microserver, and setup CIFS + NFS shares, with the intention of trying out serving up some content to my raspberry pi (running raspbmc). The CIFS share is fine, I can browse to it from my Windows machines and add it as a source from XBMC, but the NFS share just won't appear in XBMC for some reason.

I've put in 192.168.1.0/24 as "Authorised Networks" in the FreeNAS settings, and the IP of the pi as an "Authorised Host" but it just fails to acknowledge the share's existence. A few other points of note:

- My other (old, soon to be replaced) server, running Ubuntu 11.10 server edition (:rolleyes: too lazy to update) is sharing media over CIFS and NFS also, which the pi has no trouble in picking up.

- If I SSH into my other server, or use Linux Mint on my main PC I appear to be able to see the NFS share from the microserver just fine (it won't let me mount it on either because only the pi is an authorised host, but I at least get a message suggesting it found the share and would mount it if it was authorised)

Any ideas where I should start to try and track this down?
 
From memory you need to allow root mount. I think it's an option on the NFS service

Edit - in freenas go to the NFS service settings and select 'allow non-root mount'
 
Last edited:
Have you tried adding the freenas server as a source manually through the sources.xml file. My RaspberryPi doesn't find my freenas server either. But it mounts perfectly fine in Linux Mint
 
I'll take a look - though I notice the Pi *can* see the freenas server, but only via its CIFS share, not the NFS share (both are sharing the same folder)

Edit: Okay so firstly "Allow non root mount" is definitely checked in FreeNAS... so next step is to try the sources.xml file, I assume this is nestled within the /home/pi/.xbmc folder on the pi somewhere... It's strange that raspbmc can see my NFS share from Ubuntu 11.10 okay but not the one from FreeNAS, I'd be curious to understand what exactly the difference is between them
 
Last edited:
I'll take a look - though I notice the Pi *can* see the freenas server, but only via its CIFS share, not the NFS share (both are sharing the same folder)

Edit: Okay so firstly "Allow non root mount" is definitely checked in FreeNAS... so next step is to try the sources.xml file, I assume this is nestled within the /home/pi/.xbmc folder on the pi somewhere... It's strange that raspbmc can see my NFS share from Ubuntu 11.10 okay but not the one from FreeNAS, I'd be curious to understand what exactly the difference is between them

It'll be in the userdata folder which should be in there. My Raspi finds CIFS shares fine as well but doesnt see the NFS share. CIFS works perfectly fine so I've never investigated if NFS works at all.

I'll give it a bash and see if it works on mine.

EDIT: Works if you define the shares in the sources.xml

Heres mine.

Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>TV Shows</name>
            <path pathversion="1">nfs://192.168.1.250/mnt/datastorage/Media/TV/</path>
        </source>
        <source>
            <name>Movies</name>
            <path pathversion="1">nfs://192.168.1.250/mnt/datastorage/Media/Films/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">nfs://192.168.1.250/mnt/datastorage/Media/Music/</path>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>
 
Last edited:
Cheers for that, I did find the sources.xml file in the end but as it turns out manually adding the NFS share to XBMC also works... (i.e. instead of clicking "Browse" then "NFS" you actually just input "nfs://192.168.1.XX/path/to/share/" into the add source dialog directly). It's funny because on my Ubuntu server's NFS shares XBMC detects them automatically and I can just browse to them - I wonder what the difference is?

It's interesting that you find the CIFS performance to be okay, for me NFS is better but even then I'm still struggling to track down some errors... Sometimes an episode or movie will play completely perfectly, and other times I'll get freezing issues (I can remedy this by doing a quick rewind then fast forward, but its annoying). This is to an original 256Mb pi with the server wired and the pi connected via a 200Mbps set of powerline adapters, whether I use CIFS or NFS... I'm unsure if it's the pi struggling to play it back, the network itself or the powerline adapters, or maybe the server is struggling to send the data quick enough (seems unlikely), any thoughts?
 
Cheers for that, I did find the sources.xml file in the end but as it turns out manually adding the NFS share to XBMC also works... (i.e. instead of clicking "Browse" then "NFS" you actually just input "nfs://192.168.1.XX/path/to/share/" into the add source dialog directly). It's funny because on my Ubuntu server's NFS shares XBMC detects them automatically and I can just browse to them - I wonder what the difference is?

It's interesting that you find the CIFS performance to be okay, for me NFS is better but even then I'm still struggling to track down some errors... Sometimes an episode or movie will play completely perfectly, and other times I'll get freezing issues (I can remedy this by doing a quick rewind then fast forward, but its annoying). This is to an original 256Mb pi with the server wired and the pi connected via a 200Mbps set of powerline adapters, whether I use CIFS or NFS... I'm unsure if it's the pi struggling to play it back, the network itself or the powerline adapters, or maybe the server is struggling to send the data quick enough (seems unlikely), any thoughts?


Mines a model B so 512mb ram over Gigabit lan, is it overclocked at all? I've had no trouble with CIFs at all even with 20-30GB MKVs
 
Mines a model B so 512mb ram over Gigabit lan, is it overclocked at all? I've had no trouble with CIFs at all even with 20-30GB MKVs

I can check later if it's overclocked, from memory I think raspbmc might apply some basic overclock as standard but it has a menu option to switch between overclocking settings (i.e. fast, super fast etc)...

The two problems I have with it are the freezing issue I described, and the fact that every once in a while I turn it on and it seems to have failed to initialise the network interface (can't ssh in, can't use my android app over wi-fi to control it, using a usb keyboard to exit to command line reveals that as far as the pi is concerned eth0 doesn't exist). In the latter case the only solution seems to be to re-image the SD card and let raspbmc install itself again (then restore .xbmc from a backup).

It's annoying because it works perfectly other than those issues, and the freezing issue in particular is tricky because it doesn't happen in a very predictable way, making it quite hard to test if any changes I make have made a difference... (That and I can't be 100% sure it's even the Pi... could my powerline adapters be to blame? Or my router? Surely not the fileserver itself?)
 
correct me if I'm wrong, but isn't the model B a 10/100 NIC, not gigabit?

Possibly I've never thought what the LAN speed of the PI is, I just know that the FreeNAS server and the Pi both go through a Gigabit switch. Now you mention it I do vaguely recall it only being 10/100 due to cost.
 
I doubt the lack of switch and using powerline adapters is the cause. Im only using a switch as theres only a single cat5e cable into this room and I needed 4 ports.

Im using one of these if you did want to run a cable and use a switch though.

http://www.overclockers.co.uk/showproduct.php?prodid=NW-097-TP

Gigabit is also handy when transferring between your main pc and the freenas server as well. Means I get reads of ~70mbps instead of 9.5mbps
 
Well... it didn't help, I tried changing the overclock settings on raspbmc from "Normal" to "Fast" (there is a level above that, but one step at a time!), using the NFS share from my microserver to play back an SD 720p file.

About 2 or 3 minutes into playing it back, freezes... I do a quick rewind/fast-foward to get it going again... another minute or so it freezes again... this time after getting it going it plays the whole episode through to the end without any further problems...

I feel like it's got to be something to do with buffering maybe? Like the 2 or 3 minutes at the start was how long it took to fill up the memory it was allocated to buffer into? And then something weird happened? I'm not sure...
 
You might be better streaming to XBMC rather than connecting to a share? MediaPortal for example has XBMC plugin which allows streaming to XBMC.
 
in xbmc/userdata do you have an advancedsettings.xml?

if you do add the following at the bottom

Code:
<network>
<cachemembuffersize>157286400</cachemembuffersize>
</network>

If you dont have that file create one with the following inside it

Code:
<advancedsettings>
<network>
<cachemembuffersize>157286400</cachemembuffersize>
</network>
</advancedsettings>

Try that I remember that increading the buffer size for streaming over network
 
Cheers to you both, I'll look into these and see if it helps...

Is setting the buffer size to ~150Mb (come on maths, don't let me down :p) okay to do on the 256Mb model of the Pi?
 
Cheers to you both, I'll look into these and see if it helps...

Is setting the buffer size to ~150Mb (come on maths, don't let me down :p) okay to do on the 256Mb model of the Pi?

Think so, I can't remember where I got that from but I have it set in my advanced settings file :)
 
Back
Top Bottom