Complete.Org: Mailing Lists: Archives: discussion: February 2000:
[aclug-L] Re: Upgrading disk on a busy machine
Home

[aclug-L] Re: Upgrading disk on a busy machine

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: [aclug-L] Re: Upgrading disk on a busy machine
From: Jonathan Hall <jonhall@xxxxxxxxxxxx>
Date: Sun, 6 Feb 2000 21:08:40 -0600
Reply-to: aclug-L@xxxxxxxxxxxx

When I've done that in the past, I've done it by:


1. Putting the new drive in a different system that currently has Linux on
it.  Say (assuming IDE) as /dev/hdc

2. Partition it as you plan to use it... /, /var, /usr, etc, and run mkfs

3. Create a dir called, for instance /new, then mount all the partitions on
/dev/hdc in this directory (/new/var, /new/usr, /new/home, etc).

3. Use rsync, rdist, or my personal favorite (dunno why):

        cd /new
        ssh -l root <old box> 'cd /; tar -cpO' | tar -xvpf -

rsh should work, too, but I'm more familiar with ssh... :-)

This tars everything on the old machine and pipes it over the network to the
new machine, then simultaneously untars it.  Basically a huge 'cat' of your
entire filesystem.  (I think I have the syntax right up there--try it a few
times with just a couple small remote dirs to make sure it works)

4. Power down both machines and swap drives.  Boot the target machine from a
floppy disk, install LILO, then reboot as normal.

You should now have an exact copy of the old drive on the new drive... minus
any log entries made since the 'tar' took place.

I used this method to successfully migrate from a 3.2gb drive to a 10.2gb
drive, once to go from a 3.2gb to a 17.2gb, and a couple times to just make
'live' backup copies of small (170-220mb) drives.


On Sun, Feb 06, 2000 at 05:49:54PM -0600, Carl D Cravens wrote:
> I'm looking for some practical advice on upgrading a disk on a Linux box
> that's a dedicated 24/7 web/mailing list server. 
> 
> I want to completely swap disks... in the long run, I'll be putting the
> new one in and removing the old to use it in a different box.  (The
> purpose here is to a new Ultra-DMA ATA-66 drive in the primary box to
> replace a much slower drive.) The drives differ in size... the new one is
> larger.
> 
> I'm looking for advice on how to do this with the least amount of downtime
> *and* the least amount of work possible.  I've had some ideas about it and
> wrote a great deal, but have decided to delete it so as not to confuse the
> issue.  Basically, I want to duplicate the drive, create a new, additional
> partition in the larger space on the new drive, and pull the old drive
> out... getting all the /dev/hd* stuff correct on the new drive, installing
> lilo correctly, etc.  And I've got to do it quickly with no errors.  
> 
> I've got ideas, but I don't have the spare hardware or the time to
> experiment to figure out how best to do it.  (This is the part of being a
> sysadmin that I hate... having to get it right the first time because
> there isn't room to experiement or make mistakes.) 
> 
> Thanks!
> 
> --
> Carl D Cravens (raven@xxxxxxxxxxx)
> Squirt guns don't squirt people, kids do.
> 
> 

--
Tech Support: "Ok, in the lower left-hand corner of File Manager, what does
it have for 'Free'?"
Customer: "10,578 kegabytes."
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Jonathan Hall  *  jonhall@xxxxxxxxxxxx  *  PGP public key available
 Systems Admin, Future Internet Services; Goessel, KS * (316) 367-2487
         http://www.futureks.net  *  PGP Key ID: FE 00 FD 51
                  -=  Running Debian GNU/Linux  =-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[Prev in Thread] Current Thread [Next in Thread]