You are not logged in.

#1 2011-10-22 11:42:25

netrunner
Member
Registered: 2010-04-23
Posts: 5

NFS and network media player [SOLVED]

Hello everyone,

After 4 days of trying endless combinations of settings I am ready to give up and ask the Arch community for help.

I do not know if this is the right forum to ask for help, since my problem may not be only caused by my NFS setup, but its combination with my media player, but I thought it might be wise to check if NFS is indeed correctly configured...

I have a Dune HD Smart D1 networked media player with which I play videos via smb and dlna from my home server (running arch) via the wireless network (Wireless-N). I want to set up NFS in order to compare the performance to smb/dlna to stream HD video. Right now I can play 720p videos and some 1080p videos, but smb slightly stutters on some of the latest...

I have followed the Arch wiki entry about nfs4 in order to set up NFS, trying to fill the blanks with forum posts, etc.

This is what I have done:

1) Installed nfs-utils rpcbind
2) Created "/export/wd2tb1" folder.
3) Edited "/etc/exports". I intend to share wd2tb1 with all computers on the local network. Right now it looks like:

# /etc/exports
#
/export       192.168.1.0/24(ro,fsid=0,no_subtree_check,async,insecure,anonuid=1000,anongid=100)
/export/wd2tb1 192.168.1.0/24(ro,fsid=0,no_subtree_check,async,insecure,anonuid=1000,anongid=100)

4) Edited "/etc/fstab" in order to mount the share. Right now it looks like:

# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>       <dump>  <pass>
tmpfs           /tmp    tmpfs   nodev,nosuid    0       0
/dev/sda1 /boot ext4 defaults 0 1
/dev/sda2 / ext4 defaults 0 1
/dev/sda3 swap swap defaults 0 0
/dev/sda5 /var ext4 defaults 0 1
/dev/sda6 /home ext4 defaults 0 1
/dev/sdb1 /mnt/wd2tb1 ext4 defaults 0 1

#nfs export mounts
/mnt/wd2tb1 /export/wd2tb1 none rw,bind 0 0

5) Added daemons to array in rc.conf. Added those mentioned on wiki page plus "netfs" since I thought it was necessary. Right now it looks like:

DAEMONS=(hwclock syslog-ng network rpcbind crond dbus pms nfs-common nfs-server netfs @sshd @webmin @sabnzbd @sickbeard @couchpotato @vsftpd @headphones @rtorrent @httpd @subsonic @samba)

6) Made some changes (just trying stuff) to "/etc/conf.d/nfs-common.conf". Right now it looks like:

# Parameters to be passed to nfs-common (nfs clients & server) init script.
#

# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".

# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD="no"

# Options to pass to rpc.statd.
# See rpc.statd(8) for more details.
# N.B. statd normally runs on both client and server, and run-time
# options should be specified accordingly.
# STATD_OPTS="-p 32765 -o 32766"
STATD_OPTS=""

# Options to pass to sm-notify
# e.g. SMNOTIFY_OPTS="-p 32764"
SMNOTIFY_OPTS=""

# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD="yes"

# Options to pass to rpc.idmapd.
# See rpc.idmapd(8) for more details.
IDMAPD_OPTS=""

# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD="no"

# Options to pass to rpc.gssd.
# See rpc.gssd(8) for more details.
GSSD_OPTS=""

# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
PIPEFS_MOUNTPOINT=""

# Options used to mount rpc_pipefs filesystem; the default is "defaults".
PIPEFS_MOUNTOPTS=""

7) Also some changes to (again just trying stuff) to "/etc/conf.d/nfs-server.conf". Right now it looks like:

# Parameters to be passed to nfs-server init script.
#

# Options to pass to rpc.nfsd.
# See rpc.nfsd(8) for more details.
NFSD_OPTS=""

# Number of servers to start up; the default is 8 servers.
NFSD_COUNT=""

# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd".
PROCNFSD_MOUNTPOINT=""

# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid".
PROCNFSD_MOUNTOPTS=""

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option.
# See rpc.mountd(8) for more details.
#MOUNTD_OPTS="--no-nfs-version 2"

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""

# Options to pass to rpc.svcgssd.
# See rpc.svcgssd(8) for more details.
SVCGSSD_OPTS=""

I have verified with "rc.d list" that the daemons involved (netfs, nfs-common, nfs-server, rpcbind) are running.
In order to check if the share is correctly mounted I tried "cat /proc/mounts". This is the output:

rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=999761,mode=755 0 0
run /run tmpfs rw,nosuid,nodev,relatime,size=10240k,mode=755 0 0
/dev/sda2 / ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sda1 /boot ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda5 /var ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sda6 /home ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/sdb1 /mnt/wd2tb1 ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data=ordered 0 0
[b]/dev/sdb1 /export/wd2tb1 ext4 rw,relatime,user_xattr,acl,barrier=1,stripe=1,data=ordered 0 0[/b]
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,nosuid,nodev,noexec,relatime 0 0

I'd say the relevant line is the one in bold...
I do not really know what is the best way to test if NFS is correctly set up. I tried from a windows 7 machine to access the NFS share, but I did not manage to configure the windows NFS client, and I do not have any other linux machine to test this from a linux nfs client.

The problem is that when I configure my Dune media player to access the NFS share, it keeps on giving me a "Cannot access folder" message.
This is configured on the Dune by creating a network folder, specifying NFS, the server (with the IP address) and the folder share (in my case wd2tb1)...

Does anybody have an idea of what can I try to get this working?

Thanks in advance for your help!

Last edited by netrunner (2011-10-22 18:20:35)

Offline

#2 2011-10-22 13:37:49

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: NFS and network media player [SOLVED]

Did you specify the full path of the share folder in your Dune - /export/wd2tb1? To mount an nfs share via fstab I would have to use a line like:

IPADD:/export/wd2tb1 (and other mount details here).

Offline

#3 2011-10-22 15:35:06

netrunner
Member
Registered: 2010-04-23
Posts: 5

Re: NFS and network media player [SOLVED]

Specifying the whole path did the trick!
You know...I'd actually swear I had tried that, but probably before I got right the order in which the daemons must be started, which is also important to get NFS working.
I thought...just try again, because I knew I was almost there...and it worked!

Thank you!

I think I will try to do some work on the NFS4 wiki page with my findings, because I think it's lacking some important information...

Offline

#4 2011-10-23 06:30:34

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: NFS and network media player [SOLVED]

Glad you got it worked out.

Just one thing: you do not need to export /export in order to export /export/wd2tb1. In your earlier case, if you had mounted /export in your Dune you would have been able to access wd2tb1 which is inside /export. Right now you have 2 ways to access your server: /export and /export/wd2tb1.

Offline

#5 2011-10-23 07:35:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: NFS and network media player [SOLVED]

You could also just export /mnt/wd2tb1 - the bind mount to /export/wd2tb1 is unnecessary.

Offline

#6 2011-10-23 07:45:45

DerFlob
Member
From: Munich, Germany
Registered: 2011-09-18
Posts: 21

Re: NFS and network media player [SOLVED]

Only the /export line should have the "fsid=0" flag. This flag marks the root of your exports. Try removing it from your second line, then i guess, you should be able the mount via yourserver:/wd2tb1 (and so on)

Offline

Board footer

Powered by FluxBB