WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: nfs-server  (Read 18314 times)

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
nfs-server
« on: July 31, 2011, 04:35:23 PM »
Recently got TC installed on a low-end mini-ITX.  Reading a lot and understand basic TCE/Install concepts. 

Installed (on-boot) filesystems-2.6.33.3-tinycore.tcz, nfs-utils

/etc/exports ------
      /mnt/sda1     *(rw,insecure,all_squash,anonuid=65534,anongid=65535)

/etc/hosts.allow -------------
       ALL: ALL

Started services --    portmap, nfs-server

exportfs produces
      /mnt/sda1      <world>

192.168.1.11 (is the TC box)
192.168.1.3 (is a Mint-Debian box)

On Mint-Debian box
mount -t nfs 192.168.1.11:/mnt/sda1 /media/MyBook  produces

mount.nfs access denied by server while mounting ...


If I setup the server on the Mint-Debian box (identical to steps above) and run the
nfs-client on the TC box everything works as expected. 

Just can't get the nfs-server working on the TC box (or I have another problem on the Mint-Debian).

Any ideas?  I really want to use the TC box as an NFS server, print/scan server (using net SANED
and CUPS).  I thought the NFS part would be easy since I have it working on a couple of other boxes.

Thanks in advance!


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10150
Re: nfs-server
« Reply #1 on: July 31, 2011, 11:36:34 PM »
Anything in server logs? (you may need to start syslog for that)
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7329
Re: nfs-server
« Reply #2 on: August 01, 2011, 12:16:10 AM »
Hi gregg_a_g
The error message suggests that the server is running but you are not authorized to access it.
Maybe a user/group permission problem?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10150
Re: nfs-server
« Reply #3 on: August 01, 2011, 01:05:10 AM »
Also, your group id looks wrong?
The only barriers that can stop you are the ones you create yourself.

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #4 on: August 01, 2011, 05:11:02 AM »
Thanks, everyone.  I'll try to get syslog installed this afternoon and look at the logs.  What groupid would you suggest?  I found a post suggesting these values (but I did try without "anonuid" or "anongid" options at all).

I thought there might be a permission problem, but with the "all_squash" option I thought that would take care of permissions.

I'll also try "grep root /etc/passwd" and "grep root /etc/group" to try and find the right uid and gid.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10150
Re: nfs-server
« Reply #5 on: August 01, 2011, 06:21:58 AM »
syslog is in the base, you just need a bootcode to start it (or you can start it manually).
The only barriers that can stop you are the ones you create yourself.

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #6 on: August 01, 2011, 12:18:49 PM »
Okay, I got syslog running.  dmesg doesn't show any new messages when I try to mount with the nfs-client on my mint box.  ??? scratching my head at this point.  Turns out 65534 is the uid for nobody, and 65534 is the gid for nogroup (I had 65535 before, but it didn't seem to make a difference).  I'm wondering if there is a way to run "rpcinfo"?  I didn't see any mention of it in the available apps, nor can I find it in the base so far.

I'll google some more!

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7329
Re: nfs-server
« Reply #7 on: August 01, 2011, 12:28:40 PM »
Hi gregg_a_g
Rpcinfo is in  glibc_apps.tcz

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10150
Re: nfs-server
« Reply #8 on: August 01, 2011, 10:32:02 PM »
Not dmesg, /var/log/*
The only barriers that can stop you are the ones you create yourself.

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #9 on: August 03, 2011, 04:15:13 AM »
I looked in /var/log/messages (only file besides autologin and wtmp) and see
various messages, but never anything when I try to mount from another machine.
In other words, I never see any "sign" that an attempt was made to mount. 

rpcinfo -p shows nfs (2,3 and 4) look like they're running...

I rebooted with "norestore, base" and then used tce-load to add
filesystems and nfs-utils.  Reset exports, etc.  Still not working.

hmmm...

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: nfs-server
« Reply #10 on: August 03, 2011, 06:11:45 AM »
Did you run '/usr/local/etc/init.d/nfs-server start' ?

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #11 on: August 03, 2011, 06:48:11 AM »
Sure.  I tried running /usr/local/etc/init.d/nfs-server start, "starting" the server from the
"services" icon on the wbar, etc.  The "green light" show up on the services window, and
if is do "ps -e | grep nfs" I see several nfsd daemons running.  So I'm pretty sure the
server is actually running.  I also see portmap, mount, stat etc.

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #12 on: August 03, 2011, 03:04:57 PM »
More info.  I don't see any "messages" in /var/log/messages when I try to mount from my Mint-Debian box.  On the Mint-Debian box I get the error message "mount.nfsd ... connection refused.

However, I can do the following from the TC box:

sudo mkdir /mnt/hda1/testnfs
sudo mount /dev/sda1 /mnt/sda1 (this is an external usb drive)

sudo mount -t nfs 192.168.1.11:/mnt/sda1 /mnt/hda1/testnfs

This mount works!  I can see the nfs mount using "df".  Also, if I
"tail /var/log/messages" I can see "box daemon.notice mountd[2509] : authenticated mount request ....

SO, it looks like the nfsd is running okay, but for some reason the "mount request" from my Mint-Debian box is not making it to the TC box.

I'm perplexed because I setup ssh on the TC box and the Mint-Debian box and I can "ssh login" in both directions....

Is there some other "permission" I need to set on the TC box? 

Thanks again!  BTW, you guys are doing a great job.  This is a terrific distro!

Offline gregg_a_g

  • WikiUser
  • *
  • Posts: 28
Re: nfs-server
« Reply #13 on: August 05, 2011, 05:55:40 PM »
 :-[  Success!

Well after looking over all the online documents, checking and double checking my configurations, etc.,
I decided to start with a clean slate. 

On the little mini-ITX box I copied /mnt/hda1/tce/optional to a USB stick.

On the Mint-Debian box, I booted with the TinyCore 3.7 CD.  After boot I used AppBrowser to install (using "local" and the USB stick") filesystems-2.6.33.3-tinycore and nfs-utils.  Started portmap and nfs-client from the "system tools / services" menu. 

mount -t nfs 192.168.1.11:/mnt/sda1 /mnt/nfs-client1 and allw worked as it should!  I could even see
the "daemon.notice mountd authenticated mount request" in the /var/log/messages from syslogd!

I guess my Mint-Debian box is broken  :-[ or I have something misconfigured on that side.  The error
message I was getting made it look like the TC server was "refusing the connection" but now I'm pretty
sure the "request" was never making it to the TC server.

Anyway, now I have 2 TC boxes running and plan to to a hard drive install on the box running
Mint-Debian.  This has been a great learning process.  The more I study the architecture of your
distro, I can see lots of advantages and lots of flexibility.  Now I'm off to SANED and CUPS!

Thanks again for your great work and your help!  :)

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 7329
Re: nfs-server
« Reply #14 on: August 05, 2011, 06:02:10 PM »
Hi gregg_a_g
Quote
I guess my Mint-Debian box is broken   or I have something misconfigured on that side.  The error
message I was getting made it look like the TC server was "refusing the connection" but now I'm pretty
sure the "request" was never making it to the TC server.
Actually the request was making it there, otherwise it would not be refused, it would time out. It was
refused because TC did not like the way Mint-Debian was asking.