On Tue, 4 Jul 2000, Piete Brooks wrote:
> > What I wanna do is add a spare disk/partition to an existing raid1 array.
>
> Do you want to keep the N-way mirror with N copies, but add a spare so
> that when one of the N fails, it will start re-constructing immediately,
> or do you want to change it to an N+1 array ?
> [ Note that the former will be less resilient, as you can still be caught
> by multiple failures, and that the latter costs more in disk IO when
> writing
> ]
>
> If the former, just `raidhotadd'.
That is the one I was thinking of using. Will it automatically recognize
it as a spare disk? Do I need to worry about persistent-superblock or is
that a default with raidhotadd? I can't find man pages for raidhotadd.
Thanks for the info below, it'll definately be useful for understanding
new ways of creating arrays.
Tamas.
> If the latter, see below ...
>
> > Is there a way to reconfigure the drive(s) without losing data?
>
> For RAID1 it's easy -- it's the other RAIDs that are hard ...
>
>
> I would:
>
> 1) backup the data to tape `just in case' ...
> 2) shut down the RAID array.
> 3) create an N+1 way raidtab entry with N-1 of the original disks,
> and two `raid-failed' entries (so that you have a `backup' disk!).
> 4) FORCE the creation of the new raid array.
> As the N-1 disks were in the original array, they are all already
> holding the same data, so it does not matter which one is chosen as the
> `master' from which the others are copied.
> 5) `raidhotadd' the new disk you wanted to add in the first place.
> 6) When re-sync'ed, do whatever checks you want at this point ....
> a) `fsck -n' the individual disks (do **NOT** write !)
> b) `cmp -l' the individual disks `| head' and check that the first
> difference is at the end of the partition (the PSB).
> c) Look at the resultant FS.
> 7) raidhotadd the backup disk.
>