How to mount NFS share in XBMC Live? (Asrock ION/ Synology Diskstation)
#31
To get the mount to show up at boot, you can also put the NFS mount in the /etc/fstab file. I have been doing that for a while.

I add the following at the end of fstab

Code:
#NAS share
nas.local.lan:/media /home/xbmc/network/nasmedia  nfs rsize=8192,wsize=8192,timeo=14,intr,bg

The rest is the same, install the nfs-common tools, make the directory, add the line in fstab and reboot.
Reply
#32
Thank you JBNY,

Your method (fstab) is the only one working on my xbmc live 9.11 beta1.
openelec on Asrock Ionstar 330 | mce remote
Reply
#33
I came across this thread while looking for NFS support under XBMC.

There's a good document on the Ubuntu website about how to setup NFS under Linux irrespective of what's running on top. Try this Link.

One thing it does mention is about using autofs to mount the exported directories. You can also use it to mount (bind) directories on top of directories on the client so you can create a consistant directory tree. For example say NFS shares are mounted on a directory in /var/nfs/ you could then mount (bind) that on /home/xbmc/Movies.

From what I've read in the past NFS is a fair amount quicker than SMB, so if you can that's the best option to go for. I'm not an expert on NFS, but I think if you've got a problem accessing it then it's to do with permissions on the NAS. NFS is only concerned about IP address, it then comes down to user/group permissions on the exported directory. If all else fails make sure the UID's on your XBMC box and NAS match.

-Indie
Reply
#34
I've got NFS shares now working after using this thread. One question, editing rc.local and mounting that way works for me. Is there a preferable method between using rc.local and fstab that is better? Or is either method just really doing the same thing.

Using the fstab method is it possible to set the share up so that from the xbmc machine it is only read-only?

Edit: Oh and wanted to mention this thread should prob be put into the how-to section
Reply
#35
gabbott Wrote:I've got NFS shares now working after using this thread. One question, editing rc.local and mounting that way works for me. Is there a preferable method between using rc.local and fstab that is better? Or is either method just really doing the same thing.

Personally, I always prefer to use fstab rather than rc.local when mounting shares.

The only problem with that is: On many systems fstab will get processed (and shares mounted) before the network stack is fully initialized (DHCP, etc.), causing the NFS mount in fstab to fail.

If that's the case I've found that rc.local is the best alternative, as the commands it contains get run only after the other init scripts are called.
Reply
#36
gabbott Wrote:Using the fstab method is it possible to set the share up so that from the xbmc machine it is only read-only?

Take a look at this link. In short add the option 'ro' to the fstab entry.

Manuva Wrote:The only problem with that is: On many systems fstab will get processed (and shares mounted) before the network stack is fully initialized (DHCP, etc.), causing the NFS mount in fstab to fail.

If thats the case, while a little more converluted to setup, you can use autofs to get around this. The shares are then only mounted when they're accessed.
Reply
#37
Hello all,

sorry for this HUGE kick but i have a question.

Im running Ubuntu 10.04 with XBMC DHARMA. XBMC is setup on autostart
I have my NFS shares mounted with Fstab and added in XBMC

My NAS goes in standby mode after 20mins.

When my pc with XBMC is booted it starts updating the library. The movies from the NAS are not there anymore ( the share is still there ). I have to manually do "SET CONTENT" everytime before everything is added to my DB again. ( prob because the share is offline Huh )

I know SAMBA has a timeout function but doesn anyone know how i can make sure that all my movies are still present after startup with NFS.

Can someone please help me.

Thx in advance
Reply
#38
kees667 Wrote:Noob guide for using NFS on XBMC LIVE (installed on harddisk)

Credits
All credits for this information goes to uomiarz, who helped me patiently through all my problems in setting this up. Since it now finally works I decided to do a chronological tutorial, both for my own future reference if I reinstall, but also for others as this thread has grown and I ran it to very specific problems that others might not run into.

Mounting an NFS drive in XBMC Live 9.11 beta 1 (installed to harddisk on Asrock 330)
Using a Western Digital Mybook World II 1 TB nas specifically, for other NAS the NAS setup part might be different

To enter all the commands either use CTRL-ALT-F2 on your XBMC machine or go to another pc and use putty to logon to XBMC machine. I preferred the last option as it allowed me to copy paste stuff from this thread

Getting ready - NAS
The NAS needs to be set up correctly
-On your NAS: create a user that matches your XBMC user/password, and allow it access to the share you want to see in XBMC
-Under settings allow the XBMC machine's ip-address access
-Find out the full path to your NFS share. I stumbled here. My ip is 192.168.1.30, and my share name is "Private" but when I combine the two they are not my NFS path, there was a diskname in between. I found my correct path using "showmount -e 192.168.1.30" from a windows machine, which just showed me the paths available on the NAS. My path was "192.168.1.30:/DataVolume/Private" and will be used in the rest of the guide. I think it is case sensitive!

Getting ready - XBMC
XBMC machine needs to have NFS support installed. If your machine is set up correctly this command will do that for you:
Code:
sudo apt-get install nfs-common

For me it didn't. My sources file was empty (bug in 9.11 beta 1). I expect that to be solved so read this full thread if you need to edit it. Secondly I then also needed to do the command "sudo apt-get update" before nfs-common which I think tells the machine what software and updates are available for download.

Secondly also need to specify a location where the drive is mounted. Basically after mounting this is where you browse to. I used location /media/misc which I created with
Code:
sudo mkdir /media/misc
Other locations should also work, this is not a mandatory name.

First try - Mounting manually
Try this:
Code:
sudo mount -t nfs 192.168.1.30:/private /media/misc
If there are any errors look carefully what they are. I got access right errors because initially I hadn't created an XBMC user on my NAS. If you get nothing, just a new prompt, then it worked

First try - Testing if it worked
Code:
ls /media/misc
should show what is in your NFS share. You might need to add sudo before it
Code:
sudo ls /media/misc


First try - how do I open this location in XBMC?

In XBMC when you select add source and browse you see mostly network paths, but you need to browse to /media/misc. Do "add source" and then instead of "browse" just type /media/misc in the window that says <none>. Give it a name you want on a bottom window and you are all set

Getting your machine to do this everytime at boot
Use this command to open a file which is run every time at boot:
Code:
sudo pico /etc/rc.local

The last line should read "exit 0" - before that insert these two lines so that it looks like this:

Code:
mount -t nfs 192.168.1.30:/private /media/misc
sleep 10
exit 0

Sleep 10 might not be necessary, but it works for me. If you mess up while editting just quit without saving. Reboot and try if you can browse the share using:
Code:
ls /media/misc
or in XBMC. My NAS has a standby mode so in XBMC sometimes I don't see anything right away, try again after 10 seconds

That's it. Once more a great big thanks to uomiarz and others for helping me get this done. If I missed anything in this guide - please let me know, I'll edit it.

Man...I sure am glad that I found this. Blu-Ray movies are now streaming perfectly from my server over the network. I always had stutters, dropped frames and buffering when using SMB. NFS is definitely the way to go. I can actually jump through the movie now (30 sec. and 10 min increments) without any buffering at all.

Thanks to all who made this information available!

John
Reply
#39
Thanks for these detailed instructions so far, but I cannot seem to access the mounted folder from the xbmc interface. I can only see the contents of the mounted folder in putty using "sudo ls /media/TV." When I just type ls /media/TV it gives me permission denied. I think this is what is preventing me from seeing the contents of the folder in XBMC.

Also, I tried "chmod 777 /media/TV" before mounting and it worked fine, but if I do it after it gives me the error "read ony file system" message which I guess makes sense, but I can only read it, if I do it under root privileges.

Any advice?
Reply
#40
Not to bring this thread back, but I read that nfs is not supported in Dharma. Since I'm still having this problem, would it be crazy to assume that Eden would have support for it?
Reply
#41
NFS is not supported as a 'direct' protocol in Dharma. You can still use autofs or mount it as a local mount.

In Eden you can add it just like you can smb with "nfs://server.local/media/Movies"
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#42
thanks darkscout. Do you know if I can go straight from Dharma live to a nightly pre-eden?
Reply
#43
I'd back up your settings folder, but the databases should update themselves just fine.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#44
great! thanks a bunch.
Reply

Logout Mark Read Team Forum Stats Members Help
How to mount NFS share in XBMC Live? (Asrock ION/ Synology Diskstation)1