LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2002, 09:55 PM   #1
nero64
LQ Newbie
 
Registered: Nov 2002
Location: My bedroom
Distribution: RH 7.1
Posts: 29

Rep: Reputation: 15
Nfs


I can't seem to share out a directory from one of my Linux machines.

I have networked two machines. I can ping each other by names and by IP addresses. Both computers have each others details in the /etc/hosts file. I tried to set them up in a domain but i can't get any feed back when i do nslookup.

I followed the NFS chapter straight out of the linux bible which covers RH 7.1. On the server in the /etc/exports i put the share and the permissions. On the client machine i put the server name:shared folder mount point etc. When the client boots up or when i try and mount the share i get the follwing: mount: RPC: Unable to receive; errno = connection refused
 
Old 12-27-2002, 10:04 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
After setting up your exports and hosts file, adding maybe the mounts in the fstab file, did you restart the NFS server daemon on the server side ?? I got errors like that once and it drove me nuts, then after about 30 minutes I thought to myself, I'm an idiot, I haven't restarted the NFS services on the server itself.

Maybe that will do it for you, maybe not. Let us know !

And if you can, try to post your /etc/exports, /etc/hosts, and /etc/fstab if you want and it might help us determine the problem if restarting the server doesn't do the trick.
 
Old 12-28-2002, 02:53 AM   #3
nero64
LQ Newbie
 
Registered: Nov 2002
Location: My bedroom
Distribution: RH 7.1
Posts: 29

Original Poster
Rep: Reputation: 15
Here is the /etc/hosts file on my server which i have called linux620. The client is linux200. The domain i made up i am not sure if it works. I can ping the client though.

127.0.0.1 localhost localhost.localdomain
192.168.0.1 linux620 linux620.johndomain.com
192.168.0.5 linux200 linux200.johndomain.com

This the /etc/exports file on my server. I used The exact IP to see if i could get it to work. I have called the share nfsshare of /

/nfsshare 192.168.0.5/255.255.255.0(ro,no_root_squash)

Here is the /etc/fstab file on the client linux200. i created the /mnt/nfs directory

linux620:/nfsshare /mnt/nfs nfs rsize=8192,wsize=8192 0 0

My book told me to install sunrpc and nfsd modules. I did the former but the nfsd got the unresolved symbol message. When i do lsmod i can't see the nfsd listed. I restarted nfs but i still get the error on the client. I have rebooted both and i get the same.
 
Old 12-28-2002, 10:37 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
This the /etc/exports file on my server. I used The exact IP to see if i could get it to work. I have called the share nfsshare of /

/nfsshare 192.168.0.5/255.255.255.0(ro,no_root_squash)
Try this instead just as a basic setting if you want read-only for the share:

/nfsshare 192.168.0.5(ro)

That should default it to read-only and also test it without specifiying the no_root_squash

Quote:
Here is the /etc/fstab file on the client linux200. i created the /mnt/nfs directory

linux620:/nfsshare /mnt/nfs nfs rsize=8192,wsize=8192 0 0
Try this instead as you don't need the two 0 0 at the end:

linux620:/nfsshare /mnt/nfs nfs rsize=8192,wsize=8192,timeo=14

Also check your permissions on the share you have, make sure the world has at least read access if your only wanting to make it read-only.

Then just restart the nfsd daemons on the server as root with: nfsd restart (you might have to put the full path like /etc/rc.d/nfsd restart for example to where ever your nfsd script is stored) and then on the client as root just perform a mount -a to see if it mounts the share with no errors. This just keeps you from having to reboot after every change which is unecessary.
Also a side note, when you do a lsmod, it won't show the nfsd cause your specifying to lists modules, nfsd is a daemon..

Let us know if this works !

Last edited by trickykid; 12-28-2002 at 10:40 AM.
 
Old 12-29-2002, 02:06 AM   #5
nero64
LQ Newbie
 
Registered: Nov 2002
Location: My bedroom
Distribution: RH 7.1
Posts: 29

Original Poster
Rep: Reputation: 15
still getting the same error. My book says i should have the module nfsd loaded and it lists it as being loaded in the /lib/modules/kernel dir. When i do a find on it it gives me a location of /usr/include/linux/nfsd/nfsd.o. I can restart nfs but not nfsd. But isn't nfs the daemon anyway. The book does a lsmod showing under modules nfsd.

All the permissions on the dir share are correct. I use the root account on both client and server and the same password. That shouldn't matter should it.

I can ping each computer, but isn't it reading the /etc/hosts file. How do i know if they are really connected on a network.
 
Old 12-29-2002, 10:46 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
My mind must have been elsewhere, yeah you should have a nfsd module loaded.

What happens if you do a: /sbin/modprobe nfsd ??

If you can ping each computer and get replies, that means they have a network connection. But it seems without that nfsd module you won't get them connected til that is loaded.
 
Old 12-29-2002, 09:27 PM   #7
nero64
LQ Newbie
 
Registered: Nov 2002
Location: My bedroom
Distribution: RH 7.1
Posts: 29

Original Poster
Rep: Reputation: 15
I think the problem must be at the client end.

I managed to get nfsd loaded with that modprobe command and it shows up when i do lsmod and rpcinfo -p

All the required modules are loaded and i get no errors. My distro uses rpc.mountd and rpc.nfsd located in /usr/sbin and i start them by typing them at the command prompt(well that is what my book says).

Now when i do exportfs -av it says:
exporting 192.168.0.5:/nfsshare
reexporting 192.168.0.5:/nfsshare to kernel
The IP is that of the client. It is telling me that it is setting it up on the client. That is right isn't it.

I have installed all the modules etc on the client as well. I have put the line in the /etc/fstab file. but when i do the mount -a command i still get that error.

When i do lsmod the nfsd module says that it is not used by anyone (ie the field is blank). Does this matter?
 
Old 12-29-2002, 09:38 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by nero64
I have installed all the modules etc on the client as well. I have put the line in the /etc/fstab file. but when i do the mount -a command i still get that error.

When i do lsmod the nfsd module says that it is not used by anyone (ie the field is blank). Does this matter?
Well as far as I know the client side doesn't need the nfsd module loaded, only for the server.

That is fine if it states its not being used by anyone, probably most likely at this time since your client isn't connecting to it.

What distro are you using by the way ?
 
Old 12-31-2002, 01:06 AM   #9
nero64
LQ Newbie
 
Registered: Nov 2002
Location: My bedroom
Distribution: RH 7.1
Posts: 29

Original Poster
Rep: Reputation: 15
I'm using Red Hat 7.1.

When I start up the server it doesn't load nfsd or sunrpc.
Then when i install all the required stuff and i shutdown the computer i get failed when it shutdowns nfs and mountd services.

Anyway i think i have spent enough time on this. I have learnt a few things and i will try and get it running when i install Red Hat 8.0.

Thanks for the help trickykid
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
SuSE 9.0 NFS client with RHL 7.3 NFS server ocjacob Linux - Networking 0 02-01-2005 01:01 PM
fast encrypted NFS but slow regular NFS cazzazullu Linux - Networking 0 10-19-2004 10:08 AM
nfs client should it use tcp or udp to nfs serve rportmapper andersonas Linux - Networking 2 06-30-2004 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration