I struggled for weeks getting RAID working. I used this guide
http://www.linux.com/articles/52713 You will need to change it to suit your
needs, but realistically, most of it applies. This isn't for 4.4 but I am
using 4.4 and it worked. The only changes you will need are in this guide it
says make an a and b partition no the 2nd drive when initialising it, make
it d. B is used for swap. Here it is in the guide to show you what I mean

....
OpenBSD 3.8 cannot boot a kernel on a RAIDframe array, though future
versions of OpenBSD should be able to, so for now we need to split the new
partition into two slices: wd1a, with type 4.2BSD and size around 64MB, from
which we'll boot, and wd1b, with type RAID, which will hold the RAID array.
We will create these partitions with disklabel's -E option:
...

So create an a and a d partition not an a and a b partition. Of course, this
guide is for 2 drives that are both bootable, yours will be simpler of
course but it should help you out.

Also, check the archives, my posts go back a few weeks but I was working
with RAID not long ago.

Hope this helps
Chris


-----Original Message-----
From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of
kell...@gmail.com
Sent: 22 April 2009 02:24
To: misc@openbsd.org
Subject: newfs changes fstype from RAID to 4.2BSD?

I'm trying to have everything except /home mounted on wd0, with /home
mounted on a RAID 1 array comprising wd1a and wd2a.  There are no other
partitions on wd1 and wd2.  (Unless you count the c partition.)

I tried to prepare wd1 and wd2 with:
# fdisk -i wd1
# disklabel -E wd1
and following the prompts.  After writing the disklabel, here's the
output:
# disklabel wd1
# Inside MBR partition 3: type A6 start 63 size 488392002
# /dev/rwd1c:
type: ESDI
disk: ESDI/IDE disk
label: WDC WD2500AAJB-0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 30401
total sectors: 488397168
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:        488392002               63    RAID
  c:        488397168                0  unused      0     0

So far so good.  Following some advice I found on the web [1][2], I
continued with:
# newfs wd1a
Before moving forward.  But now disklabel gives the following output:
# disklabel wd1
# Inside MBR partition 3: type A6 start 63 size 488392002
# /dev/rwd1c:
type: ESDI
disk: ESDI/IDE disk
label: WDC WD2500AAJB-0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 30401
total sectors: 488397168
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:        488392002               63  4.2BSD   2048 16384    1
  c:        488397168                0  unused      0     0

It looks like wd1a's label changed.  How?  More importantly, is this a
problem for setting up a RAID array?  I know that the manual for raidctl
says "While FS_BSDFFS (e.g. 4.2BSD) will also work as the component
type, the type FS_RAID (e.g. RAID) is preferred for RAIDframe use, as it
is required for features such as auto-configuration."  But it would be
nice to keep my wd1a, and wd2a once I get to it, as FS_RAID.

I'm running 4.4-stable with GENERIC plus raid support kernel.  Which, in
case it's relevant, I did by adding
    pseudo-device   raid            4
    option RAID_AUTOCONFIG
to the GENERIC config file.  (I don't know how *else* one would do it,
but perhaps the order of the lines matters?)

Any advice is greatly appreciated!


[1] geektechnique.org/projectlab/797/openbsd-encrypted-nas-howto
[2] www.argon18.com/raid_openbsd.html

Reply via email to