Subject: Re: [Raidframe] How to recover a degraded mirror without a spare?
To: Matthew Braithwaite <matt@braithwaite.net>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: netbsd-users
Date: 12/02/2005 09:19:16
On Thu, 1 Dec 2005, Matthew Braithwaite wrote:

>> You can simply replace the failed drive (there is no need to remove it
>> first).
>
> When you say `replace' I am not sure whether you mean, `physically
> replace', or `raidctl -F'.
>
> The system can only accommodate two physical disks.  So I have to
> remove the dead disk first, and I'd rather the system were powered off
> when I did that. :-)
>
> So I guess another way to put my question is: if I power off,
> physically replace the failed disk, and restart, how will Raidframe
> react to this?
>
> I *think* what you are saying is that, whereas now I have:
>
>  wd0d: failed
>  wd1d: optimal
>
> after restarting the machine I will have:
>
>  component1: failed
>  wd1d: optimal
>
> and, therefore, I will be able to introduce (the new) wd0d into the
> RAID without any complications.
>
> Have I understood you correctly?

Bear in mind that putting a blank disk as wd0 will make the machine 
unable to boot, so you might want to boot from floppy or CD (enter boot 
hd1a: at the prompt). Alternatively, just swap the disks round; raidframe 
doesn't care.

Also, you will need to disklabel the new disk (plus fdisk and 
mbr/bootloader). The easiest way to do this is (assuming you've swapped 
the disks - you really DON'T want to get the command the wrong way 
round...): dd if=/dev/wd0d of=/dev/wd1d count=100

This will copy the partition table, disklabel and boot machinery over. 
This does assume you have a (virtually) identical disk in terms of 
geometry.

-- 
Stephen