Im trying to make an upgrade to 4.9 -> 5.0 with softraid root filesystem and im having big problems.Anybody know how to do it ?¿?

Trying the upgrade with the CDrom, the bsd.rd loaded it hasn´t softraid support so it doesn´t detect the root Raid filesystem and it´s impossible to make the upgrade.

Im trying to compile the bsd kernel of 5.0 with softraid in other machine and then using this compiled kernel in the upgrade process following these steps, but im not sure if this will work.(obviously it´s not for an 3.7 version)

------------
If we did this, we'd run into trouble when we reboot (#3), because the generic kernel does not include RAID support. I'm assuming that you are running your OpenBSD 3.6 RAID system... so here's what we need to do:
1. Follow the OpenBSD upgrade guide and STOP when you "Place install files in a "good" location."
2. Download the OpenBSD 3.7 kernel source
3. Perform the actions in part 2 ("Recompile RAID Into the Kernel") section 4 ("Configuiring the kernel") and 5 ("Compiling the kernel"). This will install the 3.7 kernel. Note: you will not need to perform the "Clean up after yourself" step... since we're not using /mnt to juggle space.
4. reboot on your RAID'ed 3.7 kernel
5. Continue following the OpenBSD upgrade guide with the step "Install new /etc/firmware files"

This will get your main RAID system onto OpenBSD 3.7, however your initial boot partitions (/dev/wd0a and /dev/wd1a) will still be running OpenBSD 3.6. If you are lazy, you can leave them alone. If you want to upgrade them, you can do the following:
1. mount the /dev/wd0a partition (foo# mount /dev/wd0a /mnt)
2. copy the 3.7 RAID kernel to the mounted partition (foo# cp -R /bsd/* /mnt/bsd/)
3. Follow the OpenBSD upgrade guide (skip the "Reboot on the new kernel" step. For step "Install new userland applications", change "cd /" to "cd /mnt")
4. unmount /dev/wd0a and repeat with /dev/wd1a
------------

Hello and welcome. Root on Softraid was not possible until just a couple of months ago for 5.0-current. It is not possible with 4.9 or 5.0-release.

I believe you are confusing RAIDframe and Softraid, which are entirely different technologies. Root-on-RAID has been available with RAIDframe for years.

If you want to convert from RAIDframe to Softraid, you will need to either use -current or wait for 5.1-release.

If you want to upgrade from 4.9 to 5.0 with RAIDframe, you will need to build a 5.0-release RAIDframe kernel on a separate build machine of the same architecture, then follow the 4.9 -> 5.0 upgrade guide, following the steps for upgrading without using the install kernel (bsd.rd).

Yes, it´s RAIDframe and not softraid, i was confused becouse i have no idea about openbsd yet

So, building a Raidframe kernel 5.0 to upgrade from 4.9 to 5.0 it´s that i did.But i was not sure if this could be work.But i will try using it and following the update steps without the bsd.rs.I´ll post the results, thanks

the raid device is /dev/raid0a , but in the boot, i think that the system actually boots with /dev/sd0a partition where it is another bsd kernel file(4.9) and then it loads the raid device.So maybe i have to put the compiled bsd kernel file(5.0) in the sd0a ?

You are correct; the OpenBSD/amd64 second stage bootloader (the small program that produces the "boot>" prompt) loads the kernel from a physical disk drive partition, it does not map RAIDframe volumes.

With your configuration, I assume that would be the "a" partition of either of your physical drives.

---

When you create a custom kernel, it is standard practice to copy GENERIC or GENERIC.MP to a new configuration file, so that kern.version or dmesg(8) produce obvious indications that a custom kernel is in use and not GENERIC. For example, if your favorite $EDITOR is vi(1) you might do something like this on your build platform:

and rebooting i have an error and its impossible to load the system , with this error:

raidctl: unable to open devfile:/dev/raid0c
cant open /dev/rraid0a: dev not configured
cant check file system

hopefully i have backup files of bsd* in /dev/sd0a and i restored everything.

Im not sure but maybe the error its becouse i did not make this following changes before rebooting ?¿

***
Save yourself a copy of the old reboot(1) command: You are still running the old kernel, it is possible the new reboot command will not run on the old kernel.

cp /sbin/reboot /sbin/oreboot

Install new userland applications. Do NOT install etc50.tgz and xetc50.tgz now, because that will overwrite your current configuration files! Note that we are installing base50.tgz LAST, because it will include a new tar(1) utility, which may or may not run on the old kernel. We reboot immediately, as the system is probably barely runnable now.

You are attempting to upgrade a system with a custom kernel. And your system will not function, as configured, without that custom kernel. This requires advanced OpenBSD administration skill; you are attempting this without that background. You are very brave, and should be congratulated.

The OpenBSD userland (all of the OS programs and tools) and the OpenBSD kernel must be kept in sync, so the custom 5.0 kernel and the 5.0 *.tgz filesets must be installed simultaneously.

The errors you posted indicate that kernel you booted is not correct; either you booted GENERIC.MP as supplied by the OpenBSD project, or, you incorrectly configured the kernel you deployed.

You can check the kernel to determine what it is -- using something like:

Code:

# mount /dev/sd0a /mnt
# config -o /tmp/not.used -e /mnt/bsd

This use of the config program will display the equivalent of "sysctl kern.version" before producing a prompt, where you can type "quit" to exit. Here is another good reason to create a RAID.MP kernel configuration file rather than editing GENERIC directly.

RAIDframe Root-on-RAID requires two additions to the kernel configuration. If you don't have both, you will not have a properly configured kernel:

The raid pseudo-device and its count of device drivers.

The raid auto configuration option.

---

If this were my production system, I would create my custom kernel and test it on a separate system of the same architecture:

install 5.0-release

download and unpack the 5.0-release kernel source code tarball

configure my RAID.MP kernel and build it

boot my custom kernel

create a set of RAID partitions, configure an array, and test that it autoconfigures when I reboot.

Then, and only then, I would package my custom kernel with the release filesets, and conduct an upgrade per the OpenBSD Upgrade Guide.

this kernel was configured correctly with raid pseudo device and the raid autoconfiguration option, im pretty sure becouse i did a raid configuration with 2 disks and it boots right and the raid device was ok.(all of this made in an exact same version machine)

Then i followed the guide steps and installed the tar files before rebooting, and bang ! the same crash !! (((( whyyyyy ! :_( I dont know why, but this is personal now, i dont know how but i´ll solve this problem.

The only thing i didn´t try is compiling the kernel with RAID.MP instead of the GENERIC.MP . you really think maybe this is the reason ? I´m not sure.

I'm sure that copying the configuration file won't make any difference at all. That's strictly so you avoid confusing yourself, or others, when you (or they) look at your dmesg output.

I see raidctl failing to find the raid0 drive, and that's why I thought it might be your use of the wrong kernel, or an invalid kernel. If you are sure this kernel is tested and valid, then an examination of the device nodes in /dev/raid* may be helpful. The untarring of base50.tgz will not eliminate /dev device nodes, but it might renumber them.

One thing you might try, after restoring (again), is to copy your custom 5.0 kernel into the root partition of your production machine as some other name, and then selecting this kernel in single-user mode from the amd64 bootloader (the "boot>" prompt). For example, "boot hd0a:/50bsd -s" -- watch the dmesg and see if the autoconfiguration discovers the array and configures it. If it doesn't, the kernel will not find a root directory and will panic. If you are able to install 5.0-release onto a USB stick/disk, you can boot your custom kernel with "-a" and select the USB stick's root partition, and then while running from the stick attempt to diagnose why autoconfiguration or raidctl may be failing. In addition, the dmesg can then be collected and then posted here, or better yet, to the OpenBSD Project's misc@ mailing list, so that a wider and more knowledgeable audience can assist you.

Other choices are possible, including staying on 4.9, doing a clean install of 5.0 rather than an upgrade of 4.9, converting from RAIDframe to Softraid now with -current or with 5.1 when it is released on or about 1 May. Are any of these of interest?