I went through a massive tonne of pain trying to set up two 1TB hard drives
in mirrored RAID with data and OS. I eventually found out my hardware just
wouldn't work with OpenBSD and RAID but trying on a different machine of
VMware and it worked. Check the archives for mine journey and everyone's
replies to this, it goes back about month-two months. Also, this guide will
help a lot, this is basically how to do it, it worked in 4.4, the only thing
is, he says to use b in the raid (which of course is usually swap, I changed
this to d.

<quote>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:

disklabel -E wd1 </quote>

 Also, when you create the partitions with disklabel -E raid0, make sure you
set them to RAID as the type

http://www.linux.com/articles/52713

If you need anymore help, give me a shout, I didn't go through all of that
headache and work for nothing

Chris

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Stefan Unterweger
Sent: 12 May 2009 11:48
To: [email protected]
Subject: Booting from softraid

Hello!

I've recently started playing around with the softraid(4) driver, as I
recently noticed that bsd.rd already comes with support for it. What I
want to accomplish is to place as much as possible into the RAID set
(RAID 1, of course), ideally (almost) booting from it.

Up until now I have used ccd(4). Since it isn't possible to create
ccd-containers at install, I've always made disklabel with some space
for the root mount, then one big slice for "the rest", and as soon as
the base install was done bring up the ccd-container, set up the "real"
disklabel there, and move /usr, /var, etc. there, relying on daily(8) to
keep my / mirrored in /altroot.

Now I'm wondering if this whole process could be simplified precisely
with softraid. I've already been able to construct a mirror set at
install. My first naive try was to make a sort of pseudo-disklabel on
the "real" disks, so that the 'a' slice just spans the entire disk,
typed "RAID". Then I instructed bioctl to build a RAID 1-set out of
those two slices. Reboot, bsd.rd still finds it, and now install into
the new sd0.

Of course, this didn't work and fails first thing at boot giving
"ERR M". Reading up about the boot process, I'm now quite sure that it
coulnd't possibly work this way ever since /boot has no way of knowing
about the softraid-container until the kernel is loaded, which precisely
would be /boot's function.

What I now tried was allocating just a very tiny "boot" slice (just
enough space for boot and the kernel), and having installboot(8)
instructed to use *this* bootloader (outside of the RAID-set) to boot.
I now get the kernel to load without problem, just as expected, and the
kernel also finds the RAID-set at sd0 as bsd.rd did, so in theory it
could just go on and boot from there. But instead, it tries to use this
"boot-slice" (wd0a) as it's root device, which of course must fail (and
does so, quite spectacularily).

The boot(8) manpage gives the hint of using '-a' to be able to specify
which drive the kernel should use as it's root drive. This way, I *am*
able to successfully boot into my newly installed system. So this looks
like my idea could at least theoretically work. However, I have not yet
found any way of somehow storing this device somewhere so that I *don't*
have to physically sit there and type in 'sd0' whenever I just happen to
be wanting to boot.

Now, what I want to ask: Is there a way to somehow "force" the root
device of my choice into the kernel, e.g. ` la config(8)? Or is there
maybe a way of specifying it into a boot.conf-stub placed into my
"boot-slice"? Or am I simply wasting my time and should stick to a root
*outside* the RAID-set which daily mirroring into /altroot?


Thanks for any advice,
  Stefan

Reply via email to