Subject: Re: rc.d/raidframeparity (Was: Multiple RAID1 partions on same disks)
To: David Brownlee <abs@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: current-users
Date: 09/03/2002 09:42:48
On Mon, Sep 02, 2002 at 05:12:20PM +0100, David Brownlee wrote:

> 	On a system here I've split the parity check/rebuild from
> 	rc.d/raidframe into an rc.d/raidframeparity which runs after
> 	quota. Does this seem sane enough to commit?
>
> [ ... ]
>
> raidframeparity_start()
> {
> 	# Initiate parity/mirror reconstruction as needed, in the background.
> 	#
> 	(
> 		for dev in `sysctl -n hw.disknames`; do
> 			case $dev in
> 			raid[0-9]*)
> 				raidctl -P $dev
> 				;;
> 			esac
> 		done
> 	) &
> }

While we're (you're!) whacking on the rc.d scripts, maybe add an option
to do the partiy reconstructions in parallel?  If the raid sets are on
separate disks then it might make sense to do them all at once...

Other than this minor nit, I quite like this.

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/