Re: remove/replace a harddisk in a unsynced raid1?

From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 09/23/04


Date: Thu, 23 Sep 2004 17:58:33 -0400

peter pilsl wrote:
>
> While reading the HowTo again now there is a differnent question left:
>
> I've setup a data-raid as raid1 with 3 mirrors (paranoia). However:
> While all three drives are marked as raid-disk in raidtab, only two
> disks are running as mirror and the third one is running as spare disk.
>
> Now how I can I make the spare disk also an active mirror? I tried to
> hotremove and hotadd it, but this didnt make it an active mirror, but
> only sparedisk again. I set a active mirror to faulty - then the
> sparedisk became an active mirror but when I readded the "faulty" disk
> after sync the faulty disk became the sparedisk now. No way to get all
> three disks active mirrors at the same time.

Your array was probably built with 2 RAID devices so anything else will
be assumed to be a spare (I guess). You might be able to "grow" the
array with mdadm. The docs say it should work to add raid devices to a
RAID-1 array, so as a first guess (untested):

mdadm -G -n 3 /dev/mdX /dev/a /dev/b /dev/c

(Note that growing an array in this manner is only currently supported
on RAID-1. You cannot dynamically grow a RAID-5 at the momemnt.)

> Is there any sense in having three mirrors on a raid1? I think its
> better to have three mirrors than two mirrors and one spare.

A three way mirror seems sensible enough. Consider:

Backing up an active filesystem isn't usually a good idea. Some people
recommend breaking one disk out of RAID-1, effectively creating an
instantaneous snapshot of the volume at that point in time and backing
up the "quiet" disk. The RAID continues to run. Of course, with a 2
drive RAID, if disaster strikes during the backup process while the RAID
is split, you're screwed. But with a three-way mirror, you can take one
offline to do the backup and still have a fully redundant RAID-1 system
in place.

That certainly seems like a sensible reason to have a three-drive
RAID-1! I'm sure plenty of other people can come up with lots of other
good reasons to use a three way mirror set.

> And - what is live without bonusquestions : A simple way to rebuild a
> raid1 (2 mirrors, 1 spare) to a raid5?

Backup, create the new array, and restore.

If your RAID-1 has two mirros and a spare, all 50GB in size (for
example), then you've got 50GB of useable space in the array. A RAID-5
on those same three disks would result in a 100GB array. Changing
configuration of the RAID like that would require a lot of data to be
moved around along with performing all the RAID-5 parity calculations.
(Not to mention resizing the filesystem!) Even if it were possible to
do dynamically, you wouldn't want to do it without doing a full backup
first, so why not just go the backup and restore route?



Relevant Pages

  • Re: Windows XP RAID 5
    ... array "disappears". ... Looking at Tom's guide to Windows XP RAID 5, ... Performance alone isn;t that big an issue for me - disk ... than 500 gig, I want it all in one easy to find and organise place. ...
    (uk.comp.homebuilt)
  • Re: [opensuse] 10.2 no RAID to 11.0 RAID 1
    ... 10.2 no RAID to 11.0 RAID 1 ... you can force rebuilds in mdadm in situations where no firmware raid will ever let you. ... Send me your problem disks that you think are impossible to assemble and I bet in a little while I can tell you how to assemble the array as long as there actually is enough there to use. ... One thing I've seen, which I don't think is your problem but shows the kind of thing that happens, a disk will drop out of the array and reappear instantly as a higher drive letter than the system really has. ...
    (SuSE)
  • Re: P5LD2-Deluxe and RAID 1 rebuild...how to stop
    ... >>> When the Intel software wants to rebuild the RAID 1 array, ... >>> disk to the other disk, to resync the members of the RAID 1 ... > One thing I'm curious about, is the Intel RAID BIOS does ...
    (alt.comp.periphs.mainboard.asus)
  • Re: RAID Problem after restore
    ... I understand that your SBS Adaptec RAID ... the Adaptec RAID (mirror) configuration information ... disk 1 is the disk on which the image of disk 0 will be ...
    (microsoft.public.windows.server.sbs)
  • RE: RAID Problem after restore
    ... I understand that your SBS Adaptec RAID ... the Adaptec RAID (mirror) configuration information ... disk 1 is the disk on which the image of disk 0 will be ...
    (microsoft.public.windows.server.sbs)