Subject: Re: RFC: root on raidframe howto
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 08/06/2003 20:01:16
On Wed, Aug 06, 2003 at 03:15:11PM +0300, Martti Kuparinen wrote:
> Thanks everyone, I have now a fully functional RAID-1 setup :-)
> 
> Please take a look at the following howto and try to spot
> errors/typos/whatever (I haven't done ispell on it yet). Send the
> corrections directly to me and I'll update the file.
> 
> http://www.piuha.net/~martti/tmp/raid
> 
> All comments are welcome!

> OK, so here are some:
> ===============================================================================
> 8 partitions:
> #        size    offset     fstype  [fsize bsize cpg/sgs]
> a: 154200176      4159     RAID
> b:   2097152 154204335     swap
> c: 156301424        63     unused      0     0
> d: 156301487         0     unused      0     0
> h:      4096        63     4.2BSD   1024  8192  64
> ===============================================================================
> 
> wd1a will contain all our RAID-1 protected files systems (/, swap and /home).
> wd1b is a swap area used for kernel dumps. Crash dumps can not be created on a
> RAID device because process scheduling is stopped when dumps happen. wd1h is a
> small filesystem in the beginning of the disk to hold the boot loader (/boot).

As an optimisation, you can put wd1b in the same area as the raid0b swap
partition. This requires some math between the wd1 disklabel and raid0
disklanel. To find the raid0b area on the physical disk, you need to
start from the end of the RAID partition, as there an offset between
the start of the raid partition on wd1 and ofsset 0 within the raid
(the place to hold the raid information, mostly).

> # cat >> /mnt/etc/rc.local << EOF
> 
> # The kernel dump device must be a real disk
> /sbin/swapctl -D /dev/wd0b
> EOF

A better way of doing it is to add a line to the fstab:
/dev/wd0b   none              dump dp


> # raidctl -s raid0
> Components:
>            /dev/wd1a: optimal
>            /dev/wd9a: failed

After reboot, wd9a won't come as wd9a, but as 'component1'.

> # raidctl -S raid0
> Reconstruction is 0% complete.
> Parity Re-write is 100% complete.
> Copyback is 100% complete.
> Reconstruction status:
>   1% |                                       | ETA: 02:16:10 \

As far as I know, raidctl -S doesn't show the progress bar.
To get it you have to use -v when starting the resconstruction:
raidctl -v -F component1 raid0

There is no way to get it after (i.e. don't ^C your raidctl -F :)

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--