LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-27-2006, 04:34 PM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Adding a box to NFS


I have a computer that is acting as a the NFS server and it's working fine with the nodes in the network. The NFS server was all set up already for me. Now, I have a new linux box I would like to connect to this NFS file server. How would I do this?

On the NFS server, I checked the /etc/exports and added the computer. Currently it looks like this:
Code:
/export 10.0.0.0/255.0.0.0(rw,async)  
/export/home 192.168.1.3/255.255.255.0(rw)
I try mounting it from the client:
Code:
mount -t nfs 192.168.1.2:/export /mnt/nfs
I get a 'connection refused'

I read on my O'Reilly books that the NFS hosts has to have the same userID/GroupID. Is this true? Could that be why?

Last edited by Micro420; 08-27-2006 at 04:36 PM.
 
Old 08-27-2006, 06:30 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Is there a firewall on the new machine blocking the ports for nfs connections?

Brian1
 
Old 08-27-2006, 06:58 PM   #3
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
No firewall whatsoever.

mount: RPC: Remote system error - Connection refused

Last edited by Micro420; 08-27-2006 at 07:01 PM.
 
Old 08-27-2006, 07:21 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Theonly thing that differs from your exports file and mine is there is a / after the share. /export/home/ 192.168.1.3/255.255.255.0(rw)

Other than that not sure as long as the service is running.
Which distro you using?
What are the permissions on the nfs share?

Brian1

Last edited by Brian1; 08-27-2006 at 07:22 PM.
 
Old 08-27-2006, 08:01 PM   #5
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Thanks for the quick reply, Brian1. I am using CentOS 4.3. I just realized that I should restart the NFS daemon, but at the moment I cannot do this due to people currently using the system. I'm hoping a simple NFS restart will fix this problem.

Brian1 - did you have to sync up your userID's and groups? Anything with /etc/passwd and /etc/group that was synced? My O'Reilly book tells me that the UserID and GroupID must match on all the hosts. I manually went into those files and changed the UID and GID to the same as the new box I am trying to connect to the NFS server.
 
Old 08-27-2006, 08:13 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
No other changes. Just modify exports and restart the service.

Brian1
 
Old 08-27-2006, 10:51 PM   #7
irpstrcr
Member
 
Registered: Mar 2005
Location: LAX
Distribution: Slackware
Posts: 40

Rep: Reputation: 15
You can add and remove exports whithout restarting nfsd with exportfs.

to export:
exportfs -o <options> <client>:<path>

to remove exports:
exportfs -u <client>:<path>

to show what is being exported:
showmount -e

Last edited by irpstrcr; 08-27-2006 at 10:54 PM.
 
Old 08-27-2006, 10:57 PM   #8
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by irpstrcr
You can add and remove exports whithout restarting nfsd with exportfs.

to export:
exportfs -o <options> <client>:<path>

to remove exports:
exportfs -u <client>:<path>

to show what is being exported:
showmount -e
Thanks for showing me the commands. Unfortunately I'm still hesitant to touch the NFS right now as there are some important jobs running in our cluster and I don't completely understand what those commands will do. I'd hate to interfere with the NFS and have the jobs have to restart. They'd kill me! LOL The jobs have been running non-stop over the weekend and this isn't urgent. Thanks!
 
Old 09-02-2006, 08:39 PM   #9
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Original Poster
Rep: Reputation: 45
THanks guys, I got my NFS working! It turns out that CentOS had turned on the firewall and IPtables. Once I disabled them, my NFS works as you all mentioned! THANK YOU!

One last question, and this isn't important, but I read in my O'Reilly NFS book that the UID and GID have to be the same on both computers. I now notice that on the client connected to the NFS, the permissions of the users are all mish-mashed. For example, UID 500=joe on the server. UID 500=sara on the client. When the client mounts the NFS from the server, it automatically gives the permissions to whoever has UID 500 (computers don't care about names!!!! LOL). Is there any easy way to fix this other than going into the /etc/passwd and /etc/groups file and manually syncing them? Again, no big deal. I'm glad I got it working this far!

Last edited by Micro420; 09-02-2006 at 10:09 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Adding Linux to a Windows XP box... kadafi Linux - Software 1 06-14-2006 02:08 PM
Setting up the NFS server on Solaris Box suresheva31 Linux - Networking 1 04-01-2005 12:51 PM
Making Fedora box an nfs server explorer Fedora 4 04-19-2004 08:40 PM
Can I install Vector Linux via NFS from a windows box? CaptainRandom VectorLinux 1 04-13-2004 07:01 PM
Mount server directory on local box using NFS esteeven Linux - Security 1 09-05-2003 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:42 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