Forum
How to mount NFS share? - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: How to mount NFS share? (/thread-1083.html)

Pages: 1 2


How to mount NFS share? - theodore - 8th Jul, 2013 04:48 AM

Hey all,

the wiki is offline and the search did not bring the correct answer, therefore i have to ask:
I just installed Xbian and tried to mount an external drive via NFS.
The drive is shared via nfs @ OS X. It's shared correctly, because my XBMC @ iPad finds the share.

I read that i have to edit the /etc/fstab file but i still don't know how. I created a new folder (/media/shows). How do i point the NFS share (IP is 192.168.1.234 and the folder /Volumes/Shows/) in the correct way in /etc/fstab?
Do i have to do something else later? Except from adding the directory in XBMC of course?

Thanks for your help.


RE: How to mount NFS share? - mk01 - 8th Jul, 2013 06:53 AM

(8th Jul, 2013 04:48 AM)theodore Wrote:  The drive is shared via nfs @ OS X. It's shared correctly, because my XBMC @ iPad finds the share.

I read that i have to edit the /etc/fstab file but i still don't know how. I created a new folder (/media/shows). How do i point the NFS share (IP is 192.168.1.234 and the folder /Volumes/Shows/) in the correct way in /etc/fstab?
Do i have to do something else later? Except from adding the directory in XBMC of course?

Thanks for your help.

most of the time problem with osx as server is "secure" setting (macosx requiring connection on ports < 1024, what xbmc can't, because is not running under root user).

to confirm this, log into xbian via ssh and on command prompt do "sudo -i", you will get root account. now do "mount 192.168.1.234:/Volumes/Shows /media/shows". if this works, is it the setup of osx. go into terminal on macox, and add -N parameter to the hfs server. lower part of the plist file should look like this, the "-N" is important:
Code:
cd /System/Library/LaunchDaemons
vi com.apple.nfsd.plist
Code:
<key>ProgramArguments</key>
        <array>
                <string>/sbin/nfsd</string>
                <string>-N</string>
        </array>

save the file and do
Code:
launchload -w unload /System/Library/LaunchDaemons/com.apple.nfsd.plist
launchload -w load /System/Library/LaunchDaemons/com.apple.nfsd.plist



RE: How to mount NFS share? - zilexa - 18th Aug, 2013 02:45 AM

I have the same issue. I have added the -N, even rebooted my Mac (10.7.5). I've added an NFS network location to XBMC (within Music, via Files) by simply typing the IP address of my macbook.
Now I can see the 4 shares in XBMC (the ones I've added to the exports file on my mac) but if I select any of them, nothing happens Sad

Any tips?


RE: How to mount NFS share? - mk01 - 19th Aug, 2013 08:53 PM

how your /etc/exports looks on the mac ? and what you get (again on the mac) after "ps aux | grep nfs" ?


RE: How to mount NFS share? - zilexa - 9th Sep, 2013 09:07 PM

(19th Aug, 2013 08:53 PM)mk01 Wrote:  how your /etc/exports looks on the mac ? and what you get (again on the mac) after "ps aux | grep nfs" ?

cat /etc/exports
Terminal
'/Users/USERNAME/Prive/TV Shows' -network 192.168.1.1 -mask 255.255.255.0 -alldirs
/Users/USERNAME/Prive/Movies -network 192.168.1.1 -mask 255.255.255.0 -alldirs
/Users/USERNAME/Prive/Pictures -network 192.168.1.1 -mask 255.255.255.0 -alldirs
/Users/USERNAME/Prive/Music -network 192.168.1.1 -mask 255.255.255.0 -alldirs
/Users/USERNAME/Music/ -network 192.168.1.1 -mask 255.255.255.0 -alldirs

ps aux | grep nfs
Terminal
root 61 0.0 0.1 2478140 3164 ?? Ss 9:48PM 0:09.91 /sbin/nfsd -N
username 947 0.0 0.0 2425480 180 s000 R+ 1:05PM 0:00.00 grep nfs



RE: How to mount NFS share? - mk01 - 9th Sep, 2013 09:23 PM

zilexa,

what uid (user) owns /Users/USERNAME folder ? you probably want's to map uids. so if the UID of the mac user is for instance 1034, change the export lines to:

Code:
/Users/USERNAME/Music/ -network 192.168.1.1 -mask 255.255.255.0 -alldirs -mapall=1034:

then your nfs uri should be

1) for mounting in linux directly
my_macs_ip:/Users/USERNAME/Music

2) in sources.xml of XBMC
nfs://my_macs_ip/Users/USERNAME/Music


RE: How to mount NFS share? - dmgmit - 5th Aug, 2014 08:04 AM

I just installed xbian 1.0 beta 2 in a USB HD. It works fine, but only I can't mount manually my nfs drive with 'sudo mount 192.168.2.137:/var/lib/mldonkey/down /home/xbian/nfs' when before with SD it was possible.
Any solution? Thanks in advance.

_Diego


RE: How to mount NFS share? - CurlyMo - 5th Aug, 2014 09:35 AM

What's the error?


RE: How to mount NFS share? - dmgmit - 5th Aug, 2014 06:03 PM

mount.nfs: Connection timed out

After 5 minuts.


RE: How to mount NFS share? - CurlyMo - 5th Aug, 2014 06:26 PM

So the command hangs and gives that message after about 5 minutes?


RE: How to mount NFS share? - dmgmit - 5th Aug, 2014 11:12 PM

Yes, It hangs and not respond for 5'


RE: How to mount NFS share? - IriDium - 6th Aug, 2014 01:44 AM

@dmgmit
1) How did you create the filesystem on the USB drive?
2) Does /home/xbian/nfs exist?
3) Are you sure everything is on the same subnet? Can you ping the NAS from the RPi?
4) Can you connect via XBMC using NFS?
5) Post output of dmesg on http://www.pastebin.com


RE: How to mount NFS share? - dmgmit - 6th Aug, 2014 02:30 AM

1) I installed xbian from SD with xbian-config (6-xbian copier)
2) I created /home/xbian/nfs manually with sudo mkdir /home/xbian/nfs and sudo chmod -R 0777 /home/xbian/nfs
3) ping 192.168.2.137
PING 192.168.2.137 (192.168.2.137) 56(84) bytes of data.
64 bytes from 192.168.2.137: icmp_req=1 ttl=64 time=0.231 ms
64 bytes from 192.168.2.137: icmp_req=2 ttl=64 time=0.166 ms
64 bytes from 192.168.2.137: icmp_req=3 ttl=64 time=0.158 ms
4) No, only appears 192.168.2.137 but doesn’t connect
5) http://pastebin.com/Zapvs0Fi

Thanks for your attention


RE: How to mount NFS share? - IriDium - 6th Aug, 2014 02:43 AM

Ok- I'm stumped. I've no idea. This is not my area of expertise BTW.

I can't see why it works with the SD card and not the USB drive - they are an exact copy. There is nothing in dmesg to say there is a problem.


RE: How to mount NFS share? - menakite - 6th Aug, 2014 03:50 AM

I suggest you upgrade via xbian-config, as you're getting a kernel oops 37 seconds after boot. That may also fix your NFS issue.