[TriLUG] raid on openbsd

Maarten Lippmann m.w.lippmann at gmail.com
Mon Nov 12 11:17:51 EST 2007


Hey Trilug,

Here's an openbsd question you guys are hopefully able to help me with.
We used to run an openbsd firewall, set up by my net-admin predecessor
that worked quite well, but unfortunately the harddisk died not too
long ago.
Fortunately I had backed up the pf.conf.
So immediately when it died I set up a kludge replacement firewall,
got some new disks and started working on an openbsd raid1 setup to
avoid a similar thing happen in the future.
I used the following guide on linux.com:
http://www.linux.com/articles/52713 to create the raid.

I got stuck, though.
I created a small base filesystem (on wd0), grabbed the source from
the disk, and rebuilt the kernel with raid support.
Then I created a boot partition on the second disk (wd1), (just 4.2bsd
as I read openbsd can't boot from raid yet) and then made a raid
partition of the rest of that disk.
Now to get the raid started I need to make that raid partition part of
an degraded array with a fake device. This will then be used to get
the latter partitions setup and synced with the disk wd0 at a reboot.

Doing this is where it starts complaining:

running the text file (raid0-textfile.conf) I created:

---
START array
# numRow numCol numSpare
1 2 0

START disks
/dev/wd2b # the fake device, non-existing, but listed in /dev/
/dev/wd1b # the raid-type fs created with disklabel on disk 2.

START layout
128 1 1 1

START queue
fifo 100
---

with the command raidctl -C "path-to-raid0-textfile.conf"  raid0
gives me the following error:

raidlookup on the device: /dev/wd2b # the fake device failed.
vnode was NULL
vnode was NULL
RAIDFRAME: failed rf_ConfigureDisks with 2
vnode was NULL
vnode was NULL
raidctl: ioctl (RAIDFRAME_CONFIGURE) failed


so it fails on the fake device, but it's supposed to not care about
that one, as I'm creating it for the first time with the -C flag.
What's wrong here? (raidctl is different for openbsd than for linux,
see openbsd man here:
http://www.openbsd.org/cgi-bin/man.cgi?query=raidctl&sektion=8)
Anyone have a clue for me (except telling me it's a lot easier with
mdadm, etc.)?

maarten

ps I'm using openbsd version 4.1



----
Please avoid sending me Word or PowerPoint attachments.
Use plain text, HTML, Open Office (odf), RTF or PDF (adobe acrobat)
formatting in stead.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the TriLUG mailing list