Subject: Re: practical RAIDframe questions
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Mike M. Volokhov <mishka@intostroy.com>
List: netbsd-users
Date: 01/27/2006 10:49:15
On Thu, 26 Jan 2006 23:40:37 +0100
Manuel Bouyer <bouyer@antioche.eu.org> wrote:

> On Thu, Jan 26, 2006 at 11:07:55PM +0100, Geert Hendrickx wrote:
> > On Thu, Jan 26, 2006 at 09:10:02PM +0100, Manuel Bouyer wrote:
> > > I setup 2 raid sets: one for root+swap and one for the rest. This way,
> > > after a reboot because of the swap partition the root+swap raid1 will be
> > > dirtly and have parity rebuilt, but as it's small it's not an issue.
> > >
> > > [...]
> > > 
> > > For reliability I recommend swap on raid. Using a small raid for swap
> > > makes the parity issue a non-issue :)
> > 
> > But setting swapoff=YES in /etc/rc.conf solves this issue too, doesn't it?
> 
> Not if you use reboot/halt instead of shutdown.
> And I suspect swapoff=YES may not always work if the system has lots
> of swap used.

This is why I have separate non RAID partition (without any overlapping
with RAID parts) for this purposes (wd[01..]b to be precise). I.e.:

  wd*a - /dev/raid0
  wd*b - swap (with enough size to be workable with single drive only)
  wd*[e-p] - other /dev/raid*, if you need them

And then in fstab:

  /dev/raid0a    /               ffs     rw              1 1
  /dev/raid0e    /other_parts    ffs     rw,softdep      1 2
  ...
  /dev/wd0b      none            swap    sw,dp           0 0
  /dev/wd1b      none            swap    sw              0 0

--
Mishka.