On Mon, Sep 09, 2002 at 10:50:32AM -0400, David Yates wrote:

> My 80 GB primary linux hard drive (dev/hda) containing / , /boot/
> and swap is dying.  I have purchases a replacement drive of the same
> size, but made by a different manufactuer.  I am wanting to avoid a
> reinstall. I need specific instructions for duplicating the old
> dying hda on to the new drive.
> I am using the grub boot loader. 
> Specifically, I need instructions for making the new blank drive
> identical to the old failing drive and making sure I can boot off of
> it using grub once the old drive is removed and the new one remains.

I haven't done this, so I don't have exact instructions.  Someone
maybe will post more exact instructions, but before following them, I
suggest you carefully understand what they mean anyway, so in the mean
time, start firing up some man pages and see if you can make sense of
the following steps:

 - Physically install new disk (probably as and IDE slave with old
   disk as master),

 - Partition new disk to match partitions of old disk (using fdisk,
   which will require a bit of learning, the "?" command is useful),

 - Make new file systems in those partitions to match old (using mke2fs
   if you are using ext2 or ext3, other for others),

 - Copy everything over to new disk, partition by partition (using cp
   with -a switch),

 - Shutdown, unplug old disk, plug new disk in its place (probably as
   master now), see if it will boot.


A few catches:

 - Some data doesn't like being copied by file-by-file from one disk
   to another.  Examples are database files and some e-mail server
   programs' spool files (like qmail), so stop and wonder what such
   things you might be running and see how they say you should back up
   and restore their data.  I am pretty sure a stock Red Hat
   installation used in unelaborated ways, won't have problems, but if
   you have customized it much, you need to think about your
   customization.

 - Disks are pretty cheap these days.  If you are running a recent
   version of Red Hat, consider getting another 80 GB disk and setting
   it up with the new one you already have in a software raid 1
   configuration.  This is a fully redundant configuration where each
   disk has a complete copy of everything.  Also, raid 1 is faster
   than a single disk on reading data and no slower than a single disk
   on writing.  It will protect you in the future.  Yes, it will
   complicate the steps you need to complete now (roughly: build a
   single disk version of a dual disk raid 1, copy data across, remove
   old disk, put in second new disk, partition it for being part of
   your raid 1, add new disk to array and raid software automatically
   brings it up to date in background).  You want to put the two raid
   1 disks on different IDE controllers to get the speed (I share one
   with my-mostly-idle-CD-ROM for mostly-high-performance, still on
   the cheap), but most motherboards have two controllers.  For
   software raid 1 you don't need any special raid hardware.


Good luck,

-kb, the Kent who will be watching for reports.



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to