Subject: Re: practical RAIDframe questions
To: Geert Hendrickx <ghen@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: netbsd-users
Date: 01/27/2006 10:32:30
Geert Hendrickx wrote:

> Hello, 
> 
> I'm planning to move our mail+file server to a software RAID-1.  I've been
> reading about RAIDframe, and even toyed with it in qemu[*], but I have no
> "real life" experience with it, so I still have a few questions: 
> 
> - Partitions.  Some people divide their physical disks (wd0, wd1, ...) into
>   multiple partitions, create multiple raid* devices on them, and then put
>   one (or more) filesystem partition(s) on each.  Others just create one
>   big partition on each physical drive, building one big raid0 device, and
>   put all their filesystem partitions on that (so raid0a, raid0b, raid0e,
>   ...).  Are there any specific advantages to either setup?  The only thing
>   I could think off is that you'll have more work recovering in the former
>   situation (more raid sets to rebuild).  

I use a separate raid device for each partition - here that's root,
swap, /var and data/home-dirs.  My logic is that if you get a bad sector
somewhere, it doesn't degrade every filesystem on the disk (as it would
if you have all your partitions on a single raid mirror) and just
degrades the filesystem on the partition that has the bad sector.

> - Swap.  Should I swap onto raid0b, or onto wd0b and wd1b?  In case of a
>   disk failure, swap on raid0b will keep working, whereas swap on wd?b will
>   not.  But I've read about problems with swap-on-raid in the past.  
>   (I know I should set swapoff=YES when swapping on raid, and I know how to
>   setup crash dumps onto a physical partition.)  

I swap on to raid, and also have a raw wd0b partition that overlaps
slightly the raid partition and use wd0b for crash dumps.  From
disklabel:

	8 partitions:
	 ...
	 b:   8388512 232866208       swap    # (Cyl. 231018*- 239339)
	 ...
	 h:   8388576 232866144       RAID    # (Cyl. 231018 - 239339)

and from fstab:

	/dev/raid1b             none            swap    sw
	/dev/wd0b               none            dump    dp

Also, having a small raid partition for swap (as Manuel mentioned) means
that it rebuilds quickly if any of those doesn't-swapoff-cleanly-on-reboot
problems happen.

> - Any other things I should be careful about?  (no, I am not considering
>   raid as a backup method -- this machine is dump(8)ing to tape daily.)

Make sure you installboot to both disks!  I've forgotten to do that in
the past, and it's a hassle if you end up needing to boot off the other
disk :/

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