Unix Technical Forum

Two identical machines sharing the /usr directory?

This is a discussion on Two identical machines sharing the /usr directory? within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hello, I've got 2 identical machines (Compaq EVO W8000) here that have quite some raw CPU power (dual Xeon ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 11:07 AM
Wim Cossement
 
Posts: n/a
Default Two identical machines sharing the /usr directory?

Hello,

I've got 2 identical machines (Compaq EVO W8000) here that have quite
some raw CPU power (dual Xeon @ 2200 MHZ + 2 GB RIMM RAM) but the SCSI
HD's are rather small (like 10 GB), and on top of this some rather large
crystallographic software has to be installed locally (most of it in
/opt on a separate partition)

One of them has been running for a year or 3 now, and initial partioning
was not done by me so / is almost full (/usr/portage and /usr/src are
already exported from my machine)
The other machine has however been completely redone, and has still
enough space to tackle the growing /usr for a few years, so I was
wondering if it would be possible and/or advisable to share this partition.

Both machines still have one unused NIC so that could be used for a
direct connection.

I was just thinking of cloning the good machine to the not so good one,
then changing the hostname and so in single user mode, but then what.

Is it possible to tell NFS (since I suppose this would be the methode
used for sharing the files) to use one specific NIC for this purpose?

Thanks in advance,

Wimmy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 11:07 AM
J.O. Aho
 
Posts: n/a
Default Re: Two identical machines sharing the /usr directory?

Wim Cossement wrote:
> Hello,
>
> I've got 2 identical machines (Compaq EVO W8000) here that have quite
> some raw CPU power (dual Xeon @ 2200 MHZ + 2 GB RIMM RAM) but the SCSI
> HD's are rather small (like 10 GB), and on top of this some rather large
> crystallographic software has to be installed locally (most of it in
> /opt on a separate partition)
>
> One of them has been running for a year or 3 now, and initial partioning
> was not done by me so / is almost full (/usr/portage and /usr/src are
> already exported from my machine)
> The other machine has however been completely redone, and has still
> enough space to tackle the growing /usr for a few years, so I was
> wondering if it would be possible and/or advisable to share this partition.


As you don't have normally any configurations in /usr and nothing there is
needed at the first part of the bootup. The problem is when upgrading packages
that stores things in /usr, you update on one machine and you will suddenly
have a mismatch of version, on the other portage will tell the wrong version
of the program is installed.


> Is it possible to tell NFS (since I suppose this would be the methode
> used for sharing the files) to use one specific NIC for this purpose?


You can tell from which ip-number to mount the remote in the fstab on the
machine whereto import the nfs-shares.



//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 11:07 AM
Wim Cossement
 
Posts: n/a
Default Re: Two identical machines sharing the /usr directory?

J.O. Aho wrote:
> As you don't have normally any configurations in /usr and nothing there
> is needed at the first part of the bootup. The problem is when upgrading
> packages that stores things in /usr, you update on one machine and you
> will suddenly have a mismatch of version, on the other portage will tell
> the wrong version of the program is installed.


Now you mention it.
So I'd have to sync /etc as well but this seems like a very bad thing to
do...

>> Is it possible to tell NFS (since I suppose this would be the methode
>> used for sharing the files) to use one specific NIC for this purpose?

>
>
> You can tell from which ip-number to mount the remote in the fstab on
> the machine whereto import the nfs-shares.


So a couple local IP shoud do the trick then?

Wimmy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 11:07 AM
J.O. Aho
 
Posts: n/a
Default Re: Two identical machines sharing the /usr directory?

Wim Cossement wrote:
> J.O. Aho wrote:
>> As you don't have normally any configurations in /usr and nothing
>> there is needed at the first part of the bootup. The problem is when
>> upgrading packages that stores things in /usr, you update on one
>> machine and you will suddenly have a mismatch of version, on the other
>> portage will tell the wrong version of the program is installed.

>
> Now you mention it.
> So I'd have to sync /etc as well but this seems like a very bad thing to
> do...


There isn't everything you want to have exactly the same on the two machines,
eg /etc/conf.d/net, /etc/fstab and other configurations that are more
depending for the host in question.

If you have a third machine, you could make it into a nfs server, and make the
two machines to use nfsroot, I guess you can with help of bind mount make
two file trees where you can have some differences for some config files.
Then you could free the 10G harddrive you have on the machines for say for
/opt. Just an idea maybe worth thinking about.


>>> Is it possible to tell NFS (since I suppose this would be the methode
>>> used for sharing the files) to use one specific NIC for this purpose?

>> You can tell from which ip-number to mount the remote in the fstab on
>> the machine whereto import the nfs-shares.

> So a couple local IP shoud do the trick then?


Yes, it should. I guess you should set up a special route rule for the two
ip's so that you won't get the package to go via the other nic to the
router/gateway.


//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 11:07 AM
Mike Ruskai
 
Posts: n/a
Default Re: Two identical machines sharing the /usr directory?

On or about Wed, 15 Feb 2006 18:04:40 +0100 did Wim Cossement
<wcosseme@nospam.bcol.be> dribble thusly:

>Hello,
>
>I've got 2 identical machines (Compaq EVO W8000) here that have quite
>some raw CPU power (dual Xeon @ 2200 MHZ + 2 GB RIMM RAM) but the SCSI

[snip]
>Both machines still have one unused NIC so that could be used for a
>direct connection.
>
>I was just thinking of cloning the good machine to the not so good one,
>then changing the hostname and so in single user mode, but then what.


It seems to me that it'd be a lot easier if you just copied and
symlinked big directories in the existing configuration to the NFS
mount.

For example, if /usr/local is packed, and you've mounted an empty
directory from the other machine on /mnt/morespace, do something like
this:

cp -pRv /usr/local/* /mnt/morespace/ulocal
rm -r /usr/local/*
ln -s /mnt/morespace/ulocal /usr/local

>Is it possible to tell NFS (since I suppose this would be the methode
>used for sharing the files) to use one specific NIC for this purpose?


This is simply a matter of TCP/IP setup. Configure the spare NIC's
with two addresses on a new network different from the one they're
already on, and connect the NFS mount to that new IP address. It'll
have to go over that NIC, given the destination address.
--
- Mike

Ignore the Python in me to send e-mail.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 11:07 AM
J.O. Aho
 
Posts: n/a
Default Re: Two identical machines sharing the /usr directory?

Mike Ruskai wrote:

> It seems to me that it'd be a lot easier if you just copied and
> symlinked big directories in the existing configuration to the NFS
> mount.
>
> For example, if /usr/local is packed, and you've mounted an empty
> directory from the other machine on /mnt/morespace, do something like
> this:
> cp -pRv /usr/local/* /mnt/morespace/ulocal


IMHO this would be better:
cp -av /usr/local/* /mnt/morespace/ulocal

> rm -r /usr/local/*
> ln -s /mnt/morespace/ulocal /usr/local


a lot better IMHO is to use bind and mount the /mnt/morespace/ulocal to /usr/local

mount -t bind /mnt/morespace/ulocal /usr/local

but best IMHO had been exporting /mnt/morespace/ulocal from the server and
then mount it directly to the clients /usr/local


//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com