On 2018-05-03, Erling Westenvik <erling.westen...@gmail.com> wrote:
> On Thu, May 03, 2018 at 10:51:12AM -0500, Brandon Tanner wrote:
>> I haven't posted here in years, and OpenBSD has been rock solid for a home
>> file server. However recently I somehow made the machine un-bootable and
>> I'm kicking myself for it now. I've tried to google my heart out to fix
>> this issue, but I doubt it is very common based on my searches.
>
> Don't panic.
>
>> My machine is OpenBSD 5.4, and has 2 x raid1 softraid with 4 disks, and a
>> 5th disc for the OS only.
>>
>> So I was wanting to try out the latest kernel to see if sysctl hw.sensors
>> would report my motherboard fan sensors since 5.4 does not, so I made a
>> bootable USB live-stick using 6.3, based on this article (
>> http://astro-gr.org/openbsd-live-usb-stick/) which says to prepare the
>> machine in QEMU and then dd it to a usb flash drive. I was able to boot the
>> USB stick fine, and run sysctl, and nope, my fan sensors are not there in
>> 6.3 either.
>>
>> Now, when I removed the stick and booted the old system (5.4), it now won't
>> boot. The complaint is that my softraid volumes have a metadata version
>> that is newer than it should be. I guess the live-USB stick actually
>> upgraded them somehow.
>
> Quoting https://www.openbsd.org/faq/upgrade60.html:
>
> "softraid(4) metadata version changed. The current softraid metadata
> version has been incremented as part of implementing support for sector
> sizes other than 512 bytes. Since on-disk metadata is automatically
> updated every time a softraid volume is mounted, once you mount a
> softraid volume on a new kernel (including bsd.rd) that volume will no
> longer be recognized by older kernels."
>
> As I see it, you have two options:
>
> 1. Upgrade your system to at least 6.0, carefully upgrading version by
>    version and following the steps for each upgrade guide:
>
>       5.4 -> 5.5
>       5.5 -> 5.6
>       5.6 -> 5.7
>       5.7 -> 5.8
>       5.8 -> 5.9
>       5.9 -> 6.0
>       6.0 -> 6.1
>       6.1 -> 6.2
>       6.2 -> 6.3
>
> 2. Do a fresh install of 6.3.
>
> I would go for option 1. It takes time but you'll learn a lot during the
> process, and in the end it may take you just as long to fine tune a
> fresh install.

There are multiple flag days in that upgrade process. Coming from 5.4,
unless it's a remote machine without console access, I would advise a
fresh install of 6.3 instead. (And even with console access, there are
some gotchas along the way). Upgrading step by step is a long slog.
You'll learn a lot from a fresh install approach too and I'd argue
those things are practically more useful.

I'd start with an install to a new main disk, with the other drives
unplugged for safety. Once it's installed and booted, connect the
softraid drives and you'll be able to mount them.

To figure out what needs transferring from the 5.4 install, it may
help to use find(1) to look for files newer than the base OS install
files, or compare a file listing (including timestamps) with one from
a fresh 5.4 install (maybe some variant of "find / -newer /some/file -ls").

If you don't have time for that, boot from a live USB or similar and
backup the softraid partition/s elsewhere (unless of course you already
have a backup). Then you could go back to 5.4, wipe and re-create the
softraid, then restore.

>> It looks like this person has a similar experience:
>> http://openbsd-archive.7691.n7.nabble.com/softraid-not-bootable-in-5-4-after-visiting-5-5-td253121.html#a253330

In that case it was not bootable but the metadata was still of the same
version. In your case running a post-6.0 version upgraded the metadata
making it unreadable by older versions. You won't be able to fix
your case just by using installboot/reattaching.


Reply via email to