October 2006 Archives

This is the second part of the instructions for setting up a software RAID in OpenBSD. If you haven't enabled RAID in your kernel (and recompiled it) yet, please read the previous post before proceeding.

First, we need to create the raid configuration file, /etc/raid0.conf (that's a zero, not a vowel). This file is broken into four parts: the array definition, the member disks, the array configuration, and I/O limits.

Here is an example file that configures three SCSI disks into RAID 5 with no spare:

START array
1 3 0

START disks
/dev/sd1a
/dev/sd2a
/dev/sd3a

START layout
128 1 1 5

START queue
fifo 100

Next, we need to create disk labels on each of the component disks, in this case sd1, sd2, and sd3:
OpenBSD is an elegantly simple operating system to administer; most software can be installed by typing a few choice keywords. Compiling binaries is generally frowned upon (as most ports are available pre-compiled as packages already) and very few system administrators will find the need to run a customized kernel. In this regard, configuring software RAID in OpenBSD could be considered complex, as there are two parts to it -- customizing the kernel and configuring the RAID itself.

This post will detail how to enable RAID in the kernel. I will follow up with how to configure the array tomorrow. If you haven't downloaded the source tree, you should do it now. I would recommend getting the patch branch from CVS (instructions are available here on the OpenBSD site).

To recompile the kernel, we will be modiying the kernel configuration file (if you are using an architecture other than i386, you will need to substitute the appropriate name):

Tag Cloud

Powered by Movable Type 4.12