[techtalk] RHL RAID-1 reconstruction?

Magni Onsoien magnio at pvv.ntnu.no
Mon Sep 18 23:53:35 EST 2000


Brian Sweeney:
> I have a raid-1 raid, called /dev/md0.  It is a raid of /dev/hda5 and
> /dev/hdc5.  /dev/hda5 dies, and so I reboot the machine and it continues in
> degraded mode, with /dev/hdc5 as the only drive in the array.  Now, I want
> to add a new drive to the array; we'll call it /dev/hde5.  I shutdown the
> machine, remove /dev/hda5 from the ide cable, add /dev/hde5, and reboot.
> Linux recognizes the drive, but does not know I want it to be introduced
> into the raid.  What do I do now?  Partition?  Set the superblock?  Ack!

First of all: the new disk will be /dev/hda if you remove the first
(failed) disk and add the new disk there.

You must set the correct partition type - 0xFD Linux raid auto. Also
partition the disk correctly and make a new filesystem. Remember the
partitions have to be at least as big as the partitions on the other
disk. (I haven't tried this with different disk size, but I guess it's
possible to add a smaller (than the mirror) partition into the raid if it
mirror isn't full.

Add the new disk to /etc/raidtab if necessary (i.e. if your new disk is
/dev/hde in stead of hda).

Then use fex. raidhotadd /dev/md0 /dev/hda5 to add the disk. Wait until
'cat /proc/mdstats' shows that the new disk is successfully mirrored.

Rerun lilo if this was your / partition.

(If someone knows how to use RedHat kickstart install to install on
RAID-1, please tell me ;) I am very aware I can install on RAID-1, but the
point is that I have no plans about doing anything manually.)




Magni :)
-- 
sash is very good for you.




More information about the Techtalk mailing list