Replacing first drive in failed array
Ed Wilts
ewilts at ewilts.org
Mon Mar 28 16:34:42 UTC 2005
On Mon, Mar 28, 2005 at 07:50:48AM -0800, Brian D. McGrew wrote:
> I've got a software RAID array on my server, it's a RAID1 array with two
> drives known as /dev/md0 made of up /dev/had and /dev/hdb. This is the
> primary boot device as well.
The first thing you need to really, really understand is that the
software RAID is done by *partition*, not by drive. Therefore, you're
not mirroring /dev/hda and /dev/hdb - you may be mirroring /dev/hda1
with /dev/hdb1, etc. You are probably not mirroring your swap
partition.
> /dev/had has failed and I need to replace
> it. However, since /dev/had is where the BIOS looks to boot, how do I
> do this without blowing myself up?
If you've mirrored *everything*, then you can drop the drive out,
replace it, and then run grub-install to put the boot block back. If you
forget and then try to reboot, you can boot into rescue mode and run
grub-install from there.
> Should I swap had and hdb so the good drive is first and replace the
> second drive? Has anyone done this before?
I believe this is documented in the software raid HOWTOs and there is
a link in the Red Hat online documentation on what you need to do. I
haven't read it lately though and I don't currently mirror my boot
disks.
--
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program
More information about the redhat-list
mailing list