Subject: Re: Volume managemanet on NetBSD SPARC.
To: Ben Cottrell <tamino@wolfhut.org>
From: Greg Oster <oster@cs.usask.ca>
List: port-sparc
Date: 08/28/2001 23:00:21
Ben Cottrell writes:
> A few things I learned from doing this over the weekend:
> 
> 	* Don't assume you'll only ever have one RAID array and
> 	  name the config file /etc/raid.conf... it has to be
> 	  /etc/raid0.conf, with the number, or else it won't be
> 	  found on bootup by the /etc/rc.d/raidframe script.
> 
> 	* RAID "autoconfiguration" isn't worth it unless you really
> 	  want to have your root partition on the RAID array. The
> 	  aforementioned script will do a fine job.

RAID autoconfiguration *is* worth it.  It means you can accidentally swap ID's 
on drives and still have the RAID come up correctly.  It also means you can have 
a drive fail at boot, and not have to worry that sd2 is now sd1.  Unless 
you are hard-coding the devices onto specific controllers and addresses,
you really should be using the autoconfig stuff.  (A big chunk of the 
non-autoconfiguration code needs to Go Away, but it's a many-tentacled 
beast, and all appendages must be severed simultaneously in order to remove 
it... and it's proving to be fiendishly difficult to remove..)

> 	* The raidctl -i step takes a *long* time. You'd better
> 	  get your disklabels the way you want them before you do
> 	  it, or you'll waste a lot of time redoing the raidctl -i.
> 
> 	* Instead of just having a backup root partition on each
> 	  disk, it might be safer to have a minimalistic /usr as well.
> 
> 	* Don't swap on a RAID array -- it's overkill. The VM system
> 	  already does perfectly good interleaving. Allocate a bit
> 	  of every drive for swap on the top-level disklabel, not
> 	  the raid0 disklabel.

This one always puzzles me... If the primary purpose of having RAID (other 
than RAID 0) on a system is to preserve it's uptime in the event of a 
component failure, why put swap on a regular filesystem where a single I/O 
error can take down the entire system?  If you split a disk into (say) a 
partition for a RAID 5 component and another piece for swap, where is your 
swap going to be if the disk gives a mighty 'clunk' and refuses to spin any 
more?  If you're just doing RAID 0 then not swapping to a RAID array might 
make sense... but other than that, if any part of the system really needs RAID, 
then put / on RAID, and swap on RAID, and (preferrably) everything else on RAID 
too.

(Oh.. and put swap on its own RAID set too... things are happier that way...)

> Post again if you have any specific questions after reading the
> raidctl man page.

Agreed. :)

Later...

Greg Oster