[OpenBSD] Installing OpenBSD on top of software raid

In this tutorial, we will demonstrate how easy it is to install OpenBSD on a software RAID1. The same principles can be applied to create RAID0,5 or more.

We have to drop to the shell since the installer does not have this functionality built in. Select “s” at the installer.

Check that we actually have more than 1x hdd:

By default, OpenBSD only creates one hdd. Run the following to manually create the second hdd:

Now initialize the MBR on both disks:

Create a label on both disks called “raid”. Dump it and restore to the second disk. Make sure to select “raid” for the “FS type“. Run the following:

Create the softraid(4) volume using the two “a” partitions. This will create a new drive called “sd0”. Run following:

where “-c” represents the RAID level and “-l” the chunk that will be used to create the RAID. These values can be adjusted to create other types of RAID arrays.

After this is done, exit the shell and proceed with the normal installation (just remember to select the new RAID drive “sd0” as the root disk).

And that’s it! Enjoy your software RAID OpenBSD system!

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *