LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-03-2009, 09:58 AM   #1
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Rep: Reputation: 16
Sharing settings among nodes.


I've got a cluster of 7 computers, and I have three related issues. I would like to share some common settings between them, but leave some of the settings local. For example, I would like to share /etc/hosts (file) and /etc/ganglia/ (folder) from a server to all the other machines. I though of maybe using NFS, but I want to leave files (/etc/modprobe and /etc/rc.conf which are hardware depended) local.

I would also like to be able to have the same user settings between all machines. I would also like to have the home folders the same. I could do NFS shares, but I'm not sure how that would effect my ssh keys... Thanks for any help!
 
Old 03-03-2009, 10:11 AM   #2
mfons
LQ Newbie
 
Registered: Mar 2009
Posts: 26

Rep: Reputation: 1
In my case, we use some scripts that do scp to the needed nodes.
You can make ssh keys so that nodes do not ask for password and scp your config files all over the nodes just with simple 'for i in nodes' ...
 
Old 03-03-2009, 10:27 AM   #3
biggerbug
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 2
How about using links for those local setting files?
I mean: put your local settings somewhere in local file-system and use link to them.
Example:
ln -s /local/modprobe /etc/modprobe
As long as every node has the same path (/local/modprobe), I believe this will work when you mount /etc from NFS.

But I think mounting /etc from NFS is a bit risky. Why don't you synchronize /etc and skip all local setting files?
 
Old 03-03-2009, 10:54 AM   #4
chitambira
Member
 
Registered: Oct 2008
Location: Online
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 51
Yeap, I think its best you use links together with NFS. Your file links will then point to the files in nfs share. Alternatively, you may want to build a repository of the files that you want to synchronise, and then use something like rsync. If your cluster was using a clustered filesystem, then you would not have a problem.

Last edited by chitambira; 04-20-2009 at 04:27 AM.
 
Old 03-03-2009, 12:33 PM   #5
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Linking all the NSF files is actually a pretty good idea, however setting that up one 7 nodes would take some time. I like the idea of using scp, but I was wondering if rsync would be better (I know rsync can use ssh). I've used rsync by inself, but I also see it has a daemon mode. How does the daemon mode work? Anybody know a good reference or tutorial?

Also, any ideas on sharing users? I've heard the words LDAP authentication before, but I don't really know if this is what I'm looking for.

Thanks for the help!

Last edited by wsduvall; 03-03-2009 at 12:36 PM.
 
Old 03-04-2009, 02:32 AM   #6
mfons
LQ Newbie
 
Registered: Mar 2009
Posts: 26

Rep: Reputation: 1
In Debian you can install with apt, then create a the config file /etc/rsyncd.conf like this (it's a simple way)
In this case I can't say which machine acts as server and which acts as client...

***********************
uid = root
gid = root

use chroot =no
hosts allow *

syslog facility = daemon
max connections = 4

[backup1]
path=/whateveryouwant
************************


Then start the daemon:
/etc/init.t/rsyncd start
and see if port 873 is listenig.

From the other machine start sincronization this way:

rsync -avvz first_machine::backup1 /directory_where_goes_the_backup

So which is the server? the machine that listens for connections or the machine that stores the data??

Anyway, this config works perfect for me and you don't have to anything with ssh passwords.

Thanks Jordi xD

Last edited by mfons; 03-04-2009 at 02:56 AM.
 
Old 03-04-2009, 02:34 AM   #7
biggerbug
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 2
Sharing users can be nicely done using NIS.

Another tips:
- installing DNS @ server maybe better than using hosts file.
- for managing/copying files to nodes you may use distributed ssh, e.g. rgang.

btw. 7 nodes is not so large, a normal copy command would suffice.
 
Old 03-04-2009, 08:25 AM   #8
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Thanks guys! I think using rsync with ssh/cron is probably just as efficient as using rsyncd.

True, copying files between 7 nodes (or even 70 nodes) would be that bad, but I was refering to linking all the config files using NFS (see abouve). That would probably require me to make 70+ links, which would take way too long.

I also like the idea of using a DNS server. I have a middlebox running DNSMasq (which does have DNS support) but I think I'm going to switch it to DHCP and DNS.

I think I'm going use LDAP authentication instead of NIS. NIS is kind of out of date and I've always been curious about LDAP. I found a good tutorial here... http://wiki.archlinux.org/index.php/...authentication.

I have just one last question. If I where to share my home folders between all 7 nodes, each with the same .ssh folder, would ssh still work? I suppose all thats in there is known_hosts, so I suppose it would.
 
Old 03-04-2009, 08:33 AM   #9
biggerbug
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 2
Quote:
Originally Posted by wsduvall View Post
I have just one last question. If I where to share my home folders between all 7 nodes, each with the same .ssh folder, would ssh still work? I suppose all thats in there is known_hosts, so I suppose it would.
This way ssh will definitely work. It is even better, since you will have the same id everywhere. You only have to do this once:

cat .ssh/id_rsa.pub >> .ssh/authorized_keys2

then you will have password-less login to every nodes.

There will not be any problem with the known_hosts file.

Last edited by biggerbug; 03-04-2009 at 08:35 AM. Reason: missing sentence
 
Old 03-04-2009, 08:37 AM   #10
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Original Poster
Rep: Reputation: 16
Cool! Thats what I thought, thanks!
 
  


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
How to know the ip of the nodes connected fs11 Linux - Networking 18 06-01-2007 02:53 AM
DISCUSSION: Sharing Mozilla Mail Messages and Settings on a Dual Boot Linux/Windows Set-up chun-mee LinuxAnswers Discussion 0 03-02-2005 01:34 PM
Disk Less Nodes kirtimaan_bkn Linux - Networking 2 09-01-2004 08:47 PM
Device nodes zoomzoom Linux - General 0 08-18-2003 08:00 AM
Diskless Nodes nikhiljosh Linux - Networking 1 04-06-2003 10:27 PM

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

All times are GMT -5. The time now is 02:01 AM.

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