> With RAID1 there is little point in adding a "spare disk" - you can just
> add another disk to the running array, ie:

You cannot "add" a third to to a two-way RAID1.
You can create a new three-way RAID1 if you want.
But you can't (AFAIK) change the number of disk is the base array.

> md0: sda1 sdb1 sdc1 [RAID1]

This means that every write has to be made to three disks rather than two.
If IO bandwidth is a concern, this is not a good thing.

> Means that partitions sdb1 and sdc1 /always/ contains an exact copy of sda1.

Not quite *always* -- only until there is a fault !

> This array can survive the failure of any two devices.

Indeed -- a "2-way + spare" cannot survive two failures in less than the time
it takes to resync the spare.  SO if that matters to you, and you can afford
the BW, use 3-way -- it may even speed up reading (which can RAID0).

> i) Performance will increase with Mika's read-balancing patch (great!)

Indeed -- if doing mostly reading, this is good.

> ii) When a disk fails in the case of the 'spare', the data has to be
>     copied over to the it. This will impair performance for a short time,
>     and means that if there is another failure before the duplication is
>     completed, then the array will go down.

Agreed, but having to do triple rather than double writes may `impair
performance' all the time. It depends what matters in your environment.

>> 3. Boot up and edit the /etc/raidtab to include the spare drive
>> 5. raidhotadd the drive
> If you decide to go with adding it to the array proper instead of as a
> spare disk, then just change that in the raidtab.

No -- that won't work (at least not with my tools, if you have PSB, which
I assume you do!).

To enlarge an array, what you should do is to create a new raid entry with the
max number of disks you want, and have all but the N which are already valid
marked in raidtab as raid-failed.
Then run mkraid.  This will sync the N which are already valid, which should
work (assuming they are already in sync).
Then `raid hot add' the other (not pre-sync'ed) ones.


> As an aside, I was wondering if there might ever be support for having a
> spare disk assigned to more than one array?

I've long wanted this -- it seems silly (but easier to implement) to have to
have N spare disks for N arrays ...

Reply via email to