Tiny Core Linux
Tiny Core Extensions => TCE Tips & Tricks => Topic started by: arcturus on August 26, 2012, 12:33:04 PM
-
Forgive me for this but I feel I have to ask someone who knows more than me on this...
How do I install NFS client and mount a freakin nfs share in microcore? I installed nfs-utils but I can't get it to work.
The command "sudo mount -t nfs 192.168.1.193:/media /mnt/nfs" will just give me:
"mount: 192.168.1.193:/media failed, reason given by server: permission denied"
"mount: mounting 192.168.1.193:/media on /mnt/nfs failed: Bad file descriptor"
I have a Ubuntu server sharing some media files in my network and it works fine when I connect to it from my kubuntu desktop machine...
-
"Permission denied", I take you've checked your server's logs and settings, that your TC machine is allowed to connect?
-
I'm working with the idea that there is something wrong with the server configuration after all, even though it works flawlessly when I connect to it with my desktop pc... Forgive me for asking trivial things here but I'm new to microcore, and there are less google hits for my mc problems then when I have issues with ubuntu :)
-
Did you read the nfs-utils info fire regarding filesystem-`uname-r` ?
Did you run /usr/local/etc/init.d/nfs-server start on the server and nf-client on the client?
Did you create a proper /etc/exports on the server?
-
The way I read the info about 'uname-r' made me think it was only relevant if I wanted to run an nfs server... Are you telling me I need that for my client too?
The nfs server starts at boot and is connecting fine with my kubuntu desktop machine. Changing IP in /etc/exports seems to have no effect on my kubuntu machine though. It mounts my nfs share happily whatever IP I use. Shouldn't this IP describe the adress I want to share a directory to? (Yes, I did tell the nfs server I edited /etx/exports with "exportfs -ra").
Khrmmm... :-[ I kind of missed starting the nfs client on my mc box... Kubuntu did that for me after installing the client so I guess I thought mc would do that too... Anyway that did not change anything. Still the same error when trying to mount the nfs share...
My /etc/exports on server side:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_sub$
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/export 192.168.1.247/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/media 192.168.1.247/24(rw,nohide,insecure,no_subtree_check,async)
-
Not being sure on how you run it off your ubuntu server, maybe you need to define it in hosts.allow, i do.
But you also say in between the lines that you did not need to do that with the other machine. Its only for inet or tcp wrapped services.
-
Your exports file is incorrect.
192.168.1.247/24 and 192.168.1.247/24
are neither machine addresses nor network addresses.
-
Hi arcturus
If these are your exports:
/export 192.168.1.247/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/media 192.168.1.247/24(rw,nohide,insecure,no_subtree_check,async)
Shouldn't your mount command look more like:
sudo mount -t nfs 192.168.1.193:/export/media /mnt/nfs
instead of:
sudo mount -t nfs 192.168.1.193:/media /mnt/nfs
192.168.1.247/24
I'm not sure what that does, it might resolve to sub addresses 247-255.
I think this is legal:
192.168.1.0/24
-
Thanks! I'm in a hurry now. Will reply later. You have given me several relevant ideas that I'll have to try...
-
Thank you all! I finally got it working tonight. I had made several mistakes:
1.) The nfs-client had to be started with "sudo". It reports OK without sudo but it won't start... "./nfs-client status" said "nfs-client not running".
2.) My /etc/exports was indeed incorrect. I had tried a lot of different things here and left an invalid IP.
3.) I edited "hosts.allow" on my server to allow connections by "portmap" and "rpc.mountd" from any
machine on my network (don't know if this was really needed though).
4.) Kind of forgot the non-persistent nature of tc/mc - my mountpoint /mnt/nfs had vanished since i created it... :-[
The strangest thing in all this is how my kubuntu destop machine would just mount my share without any errors...
Again many thanks! Yep! I'm a bit of a newbie but with your help I solved this. Now my network music player box is
one step closer to reality :)
-
excuse me for asking stupid question but are you sure the two ubuntu machines are not sharing files through samba?
Im starting to get the picture that you unto know have been more of a user and i imagine one could share a folder on ubuntu server like in windows with right click and thats what you did and maybe ubuntu per default shares to cifs not having to ask "do you wanna share with default support in a windows enviroment?" and just do so.
And maybe something along the same lines happens when you used the client probably something like nautilius to even browse there (no nfs then, unless yp).
Happy you got it to work nfs still also seems complex to me after 12years of usage but it always proves me wrong.
-
You need to edit /opt/bootlocal.sh.
Add
/usr/local/etc/init.d/nfs-client start
You can also create your mount points here, and mount your nfs shares.
No sudo is needed here, as it runs as root already.
-
Already fixed the autostart of the nfs-client in bootlocal.sh, but thanks for the tip :)
ananix: I'm pretty sure I'm not sharing over samba. Samba works really crappy for me as I can't get resonable write speeds to my file server. It's a slow 1.3GHz mobile celeron server but with gigabit ethernet and I'll only get like 10Mbyte/sec write speed over samba. Thats why I stopped using it for my PC and went with nfs instead. That'll give me like 60-70Mbytes/sec write speeds... I do have the media directory shared over samba too, but thats only used by my WD Live media player box. And no I did not mount my network drives with a right click. I never got that working... :)
Next up: USB soundcard and MPD.
Thanks again!
-
Hi arcturus
It's a slow 1.3GHz mobile celeron server but with gigabit ethernet and I'll only get like 10Mbyte/sec write speed over samba.
I'm running a Samba server on hardware that is far less capable than yours, and relative to the speed of my
hardware, my results are far better. I achieve 4Mbyte download speeds using a 233Mhz Pentium MMX with a
100Mbit/Sec. network card. See:
http://forum.tinycorelinux.net/index.php/topic,12544.msg68122.html#msg68122
http://forum.tinycorelinux.net/index.php/topic,12276.msg66046.html#msg66046