LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-26-2011, 02:10 PM   #1
LiamM
LQ Newbie
 
Registered: Sep 2011
Posts: 7

Rep: Reputation: Disabled
Setting up a network of CentOS 5.7 Machines


Hi there,

I have two machines under the same subnet, running CentOS 5.7. I would like one to run as a server, with the other being able to access a drive on the 'server'. Further to this, I would also like to store the profiles of the 'client' machine on the 'server' machine, thus mounting the network drives on booting. How can I go about accomplishing this? I've Googled extensively, but I can't find any information on the subject without a heavy slant to Windows/Linux interaction, and would appreciate a straight forward answer on where to look and possibly what to do. Thanks .

Liam
 
Old 11-26-2011, 02:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You just want NFS to achieve that. Nothing fancy, just an entry in /etc/exports.

if this scales you'll be wanting centralized user accounts, I'd say openldap is the best way to do that.
 
Old 11-27-2011, 09:48 PM   #3
LiamM
LQ Newbie
 
Registered: Sep 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
You just want NFS to achieve that. Nothing fancy, just an entry in /etc/exports.

if this scales you'll be wanting centralized user accounts, I'd say openldap is the best way to do that.
Thanks for the recommendations, and the possible way forward with user accounts. I'll update my progress at the end of the day, add a few datails about what worked for me.
 
Old 11-28-2011, 01:59 AM   #4
LiamM
LQ Newbie
 
Registered: Sep 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Not much progress, I spent most of my day doing actual work (god forbid!). I did, however, try the following:
  1. Added the line '/raid *(rw,sync)' to /etc/exports on the server. The path /'raid corresponds to the directory I intend to share (which is a raid volume).
  2. Restarted the nfs service on the server using '/etc/init.d/nfs restart'.
  3. Added the directory /raid on the client computer.
  4. Attempted to mount the nfs volume using 'mount -t nfs4 192.168.10.31:/raid /raid'

It is at this point I received 'mount.nfs4: Operation not permitted'. The mount command was issued as root, so I assume it's not a permissions problem. My diagnostic process was as follows:
  1. I checked that NFS4 is enabled (using 'rcpinfo -p'), and it is on port 2049 for both TCP and UDP.
  2. I've checked that the rpc.idmap daemon is running on both the server and the client (using 'ps -ef | grep idmap'), which it is.
  3. The firewalls are disabled (We have a hardware firewall), and I confirmed this using 'iptables -L' and seeing that the default input, output and forward policy is "ACCEPT".
  4. I ran 'showmount -e 192.168.10.31' (where that ip address corresponds to the server), and received the following:

Quote:
Export list for 192.168.10.31:
/raid *
If I have understood correctly, this means that /raid is being shared, and can be mounted by anyone. Except, apparently, my client computer!

Any suggestion as to how to proceed?

Last edited by LiamM; 11-28-2011 at 02:12 AM.
 
Old 11-28-2011, 02:12 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
your server side exports config is for conventional nfs, I would suggest just sticking with that, and not worrying about nfs4 for now.
 
Old 11-29-2011, 10:04 PM   #6
LiamM
LQ Newbie
 
Registered: Sep 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
your server side exports config is for conventional nfs, I would suggest just sticking with that, and not worrying about nfs4 for now.
Ah, thanks! Seems to be working now, a silly mistake on my part.

Something I didn't include above was automatically starting the NFS service. This was done through the 'ntsysv' utility (started from the console).

Now, I think I'll give openldap a try. Should I start a new thread, or continue in this one? Seems I should start a new one, given that this thread has served it's purpose, and gives a pretty good little summary of setting up an nfs share.

Last edited by LiamM; 11-29-2011 at 10:14 PM.
 
Old 11-30-2011, 01:38 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yep, new thread ftw.
 
  


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
Lost in the network: setting up network on Laptop with virtual guest machines pdaalder Linux - Networking 1 02-16-2010 04:33 AM
Setting up network between 3 Centos in Virtualbox matt123 Linux - Networking 6 10-27-2009 09:36 AM
Setting network hostname on CentOS 4.4 Pezzoni Linux - Networking 6 04-02-2007 01:04 PM
Setting network interface to use on CentOS kgoth Linux - Networking 1 12-10-2005 04:30 AM
setting up a home network/ machines won't ping each other rsheridan6 Linux - Networking 5 04-21-2003 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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