Jonathan Baker-Bates wrote:
It's really quite easy to replace a drive.
1)Just create the same partition layout on the new drive.
You just want to do this*:
`fdisk -d /dev/hde > /etc/hde.sfdisk`
`fdisk -d /dev/hdg > /etc/hdg.sfdisk`
then if hdg fails `sfdisk /dev/hdg < /etc/hdg.sfdisk`
2)Do a 'raidhotadd /dev/md(array number) /dev/hd(partition number) for
each array. Look in /etc/raidtab for details on what maps to what.
*Personally I'm really lazy so I do this :
dd if=/dev/gooddrive of=/dev/replacementdrive count=1024
echo "w" |fdisk /dev/replacementdrive
(copy the partition table from the good drive to the new drive, and use
fdisk to force linux to reread the partition table.)
Ah great (although the fdisk with Red Hat doesn't have a -d switch). I'll
mail the Software RAID Howto maintainer and suggest he expands his section
on recovery to include something like this.
Opps that should have been sfdisk -d;-)
--
Unless you can't avoid it never put a
serial number on any of your systems!!
(The Numberless Rule of Hardware Acquisition)
Sam Flory <sflory@xxxxxxxxxxxx>