I've been trying off and on for a couple of weeks to get nfs functioning in some sort of rational way, and it's completely stonewalling me....
The setup
I've got a mini-itx server that I've been very happy to have ubuntu on since 6.04, I'm now at 12.04
Never had a desire to set up nfs, since samba/cifs (then when the time came; netatalk) worked marvellously, and I could ignore any cpu and network overhead.
Now, I'm trying to squeeze and test all I can out of a raspberry pi with xbmc, and nfs is one way to do that.
Getting NFS to work has been painful, and very much like skateboarding through a concrete maze in the dark.
This is my /etc/exports
Code:
#/media/ *(rw,sync,no_root_squash)
/export *(ro,all_squash,fsid=0,insecure)
/export/G-Rated 192.168.0.0/24(rw,all_squash,insecure)
/export/PG-Rated 192.168.0.0/24(rw,all_squash,insecure)
/export/Metadata 192.168.0.0/24(rw,insecure)
And the bits of my /etc/fstab
Code:
#NFS Exports
/media/Shared/Video/Metadata /export/Metadata nobootwait bind 0 0
/media/Shared/Video/Movies,\040Cartoons,\040and\040TV\040-\040G\040rated /export/G-Rated nobootwait bind 0 0
/media/Shared/Video/Movies,\040Cartoons,\040and\040TV\040-\040PG\040-\040PG13\040rated/ /export/PG-Rated nobootwait bind 0 0
And, for good measure, a printout of the folder:
Code:
$ ls -la /export/
total 64
drwxrwxrwx 9 root root 4096 Aug 12 01:21 .
drwxr-xr-x 25 root root 4096 Jul 16 23:31 ..
drwxrwsrwx 28 josh josh 24576 Aug 11 18:25 Downloads
drwxrwxrwx 17 josh josh 4096 Aug 11 18:06 Educational
-rw-rw-r-- 1 josh josh 0 Aug 12 01:21 FAKE.mp4
drwxrwsrwx 5 josh josh 4096 Apr 9 15:31 G-Rated
drwxrwxrwx 30 josh josh 12288 Aug 8 15:06 HD-Movies
drwxrwxrwx 10 josh josh 4096 Aug 12 02:36 Metadata
drwxrwsrwx 6 root root 4096 May 26 22:38 PG-Rated
drwxrwxrwx 6 root root 4096 Aug 12 01:21 R-Rated
The frustration and head-shaking
I've now progressed to where I can see the folders from XBMC, but any folder that is mounted on the server DISAPPEARS from the clients!
Example: I add
Code:
nfs://192.168.0.100/export/
through the add server dialog, and am not able to see the contents properly:
Now, it took me a while to figure this out, but if I "sudo umount /export/G-Rated", and then refresh the listing, I see this:
Code:
G-Rated
R-Rated
FAKE.mp4
Of course, G-rated is empty.
I also, right from the raspberry, ran "sudo mount 192.168.0.100:/export /media/export/"
and mounted or unmounted, the G-Rated folder is empty...
Here's the mounted export folder:
Code:
pi@raspbmc:/media/export$ ls -la
total 36
drwxrwxrwx 9 root root 4096 Aug 12 01:21 .
drwxr-xr-x 12 root root 4096 Aug 12 02:19 ..
drwxr-xr-x 2 root root 4096 Jul 16 23:33 Downloads
drwxr-xr-x 2 root root 4096 Jul 16 23:42 Educational
-rw-rw-r-- 1 pi pi 0 Aug 12 01:21 FAKE.mp4
drwxr-xr-x 2 root root 4096 Jul 16 23:33 G-Rated
drwxr-xr-x 2 root root 4096 Jul 17 16:17 HD-Movies
drwxr-xr-x 2 root root 4096 Jul 17 23:50 Metadata
drwxr-xr-x 2 root root 4096 Jul 16 23:33 PG-Rated
drwxrwxrwx 6 root root 4096 Aug 12 01:21 R-Rated
The part where I question WHY and wonder if Ubuntu is still trying to be friendly
I've tried following every NFS troubleshooting I can find, including the wrongly-named "Troubleshooting" section of https://help.ubuntu.com/community/SettingUpNFSHowTo
A quick rundown of thing's I've tried:
changed /etc/default/nfs-common to include RPCGSSDOPTS="-vvv"
changed /etc/default/nfs-kernel-server to include RPCSVCGSSDOPTS="-vvv"
Searched for log messages while connecting, mounting, reconnecting, etc:
tail /var/log/daemon.log (as suggested by https://help.ubuntu.com/community/NF...roubleshooting - no such log any more)
ls -la /var/log/ (Looking for all files with ~now as the modify date)
tail /var/log/kern.log
dmesg (These last two at least mentioned NFSD, but only that it started, nothing past that)
"sudo /etc/init.d/nfs-kernel-server stop" , then "/usr/sbin/rpc.nfsd -d auth -d ugid" (Attempted a bunch of switches to make it run in terminal.. no such luck)
Started skimming yet?
As well you should.. All I wanted was to test NFS, and even through using the internet, have been completely unable to... I even thought that as a basic service, it would have rational and readable troubleshooting documents, like logs in /var/log/*.
If I have missed something Critical, please tell me so I can fix it, then I can update at least 3 wikis and 7 forum threads... I would gladly take a facepalm moment at this point...
Bookmarks