Re: remove/replace a harddisk in a unsynced raid1?
From: John-Paul Stewart (jpstewart_at_binaryfoundry.ca)
Date: 09/23/04
- Next message: Travis Casey: "Re: SPF = Sender Policy Framework"
- Previous message: Tom Friedetzky: "Re: octet vs. byte"
- In reply to: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Next in thread: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Reply: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Next message: Travis Casey: "Re: SPF = Sender Policy Framework"
- Previous message: Tom Friedetzky: "Re: octet vs. byte"
- In reply to: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Next in thread: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Reply: peter pilsl: "Re: remove/replace a harddisk in a unsynced raid1?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|