Installing OpenBSD 6.5 sparc64 onto RAID1, part 2

Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing OpenBSD 6.5 sparc64 onto RAID1, part 2

Chris Ross
So, thanks for help from Gao-Mi and Alex.  Starting a new email thread after
some more work. From my latest on old thread:

On Mon, Jul 01, 2019 at 01:02:58PM -0400, Chris Ross wrote:
> [ installboot limits softraid bootloader to 160kb ]
>
> Anyone else have an idea what I could try to see why ofwboot seems not to
> be able to load and boot my system from my RAID1 softraid on sparc64?

So, a bunch of work to build my custom world allowing for larger bootloader
in softraid:  I ended up building this new custom softraid onto sd0 and sd1,
and was able to load the debugging ofwboot into it.  But, "it just worked."

:-(  So, I think the issue was that it didn't work for some reason with
my raid1 on sd2 and sd3, but did work loaded from sd0 and sd1.  Still
identifying itself as sd4 after boot, but.  I also dropped back to a
fresh install from an unmodified 6.5 ISO, onto a softraid on sd0/sd1,
and that worked just fine too.

I thought about cutting my losses and just running on sd0/sd1, but then
decided I'll take another few days to rerun the whole process again
onto sd2/sd3.  If I get it to fail there, again, I'll see what the
debug ofwboot shows, and I have a single-disk install on sd1 that I can
build changes with.

Just an update, hopefully I'll have more to report by next week.

                   - CHris

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.5 sparc64 onto RAID1, part 2

Claudio Jeker
On Wed, Jul 10, 2019 at 12:13:30AM -0400, Chris Ross wrote:

> So, thanks for help from Gao-Mi and Alex.  Starting a new email thread after
> some more work. From my latest on old thread:
>
> On Mon, Jul 01, 2019 at 01:02:58PM -0400, Chris Ross wrote:
> > [ installboot limits softraid bootloader to 160kb ]
> >
> > Anyone else have an idea what I could try to see why ofwboot seems not to
> > be able to load and boot my system from my RAID1 softraid on sparc64?
>
> So, a bunch of work to build my custom world allowing for larger bootloader
> in softraid:  I ended up building this new custom softraid onto sd0 and sd1,
> and was able to load the debugging ofwboot into it.  But, "it just worked."
>
> :-(  So, I think the issue was that it didn't work for some reason with
> my raid1 on sd2 and sd3, but did work loaded from sd0 and sd1.  Still
> identifying itself as sd4 after boot, but.  I also dropped back to a
> fresh install from an unmodified 6.5 ISO, onto a softraid on sd0/sd1,
> and that worked just fine too.
>
> I thought about cutting my losses and just running on sd0/sd1, but then
> decided I'll take another few days to rerun the whole process again
> onto sd2/sd3.  If I get it to fail there, again, I'll see what the
> debug ofwboot shows, and I have a single-disk install on sd1 that I can
> build changes with.
>
> Just an update, hopefully I'll have more to report by next week.
>

Discovery of disk to assemble as softraid in ofwboot is not ideal. It
looks at every disk that is part of the device tree. The problem is that
most disks don't show up like this (especially true for modern SAS
controllers). The discovery process needs to be changed. I think using
devalias info as a list of devices to assemble would make sense.
People can use nvalias to store all disks of a softraid in NVRAM.
Also I think the code does no look at the boot-device info to check that
drive for a softraid partition.

--
:wq Claudio

Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.5 sparc64 onto RAID1, part 2

Chris Ross
On Wed, Jul 10, 2019 at 02:20:36PM +0200, Claudio Jeker wrote:
> [ softraid on sd0/sd1 works, softraid on sd2/sd3 doesn't ]
>
> If I get it to fail there, again, I'll see what the
> debug ofwboot shows, and I have a single-disk install on sd1 that I can
> build changes with.

> Just an update, hopefully I'll have more to report by next week.

Okay.  So, hit a minor issue that I think I need some help with.  I rebuilt
the world with softraidvar.h modified to allow a larger bootloader. And,
then I manually built an installation of this OpenBSD 6.5 onto a softraid
mirror on sd2/sd3.  As before, it does fail to boot from this, but unfortunately
I'm seeing an additional error that implies I did something wrong:

{0} ok boot disk2 sr0

Boot device: /pci@0/pci@0/pci@2/scsi@0/disk@2  File and args: sr0
OpenBSD IEEE 1275 Bootblock 1.4
>> OpenBSD BOOT 1.12
ERROR: /iscsi-hba: No iscsi-network-bootpath property
Bad magic number in disk label
Can't open disk label package
Unknown device: sr0
Cannot boot from softraid: Unknown error: code 19
Program terminated
{0} ok

Specifically, the two lines about disk label were _not_ there in my earlier
attempts.  Is this because I installed my softraid and only some part of
the OS understands that I changed the layout?  Or, is there something I
failed to do when manaully initizing the disks for, or in, the softraid?

Help appreciated.  I have output from a debugging ofwboot, but I assume
if this is in play, it's a variable I should try to squash first.

                    - Chris


Reply | Threaded
Open this post in threaded view
|

Re: Installing OpenBSD 6.5 sparc64 onto RAID1, part 2

Chris Ross
On Fri, Jul 12, 2019 at 11:53:34AM -0400, Chris Ross wrote:
> > Just an update, hopefully I'll have more to report by next week.
>
> [- installed softraid onto sd2/sd3, with a larger SR_BOOT_LOADER_SIZE,
>    but either that change, or something I did wrong in assembling the
>    softraid, caused an additional error when trying to boot. -]

So, I tried a few things to re-write and update the disk labels on sd2/sd3,
and on the softraid (sd4).  I tried reinstalling the boot blocks and loader
on the softraid.  I seem to always get this error, with the normal and
with the debugging version of ofwboot.  So, my plan to get more information
to help debug why ofwboot is able to boot from a softraid mirror on sd0/sd1,
but _not_ on sd2/sd3, I am stuck.

If someone has some ideas of what I did wrong, or if making the change
to SR_BOOT_LOADER_SIZE is causing this, let me know.  I swear when I built
a installation on sd0/sd1 with the larger SR_BOOT_LOADER_SIZE I did _not_
see this error, so I think I may just have messed up setting up the sd2/sd3
softraid, but I can't figure out out to fix it.

But, lacking any other suggestions, I'm going to bail at this point.  We
should document that on sparc64, ofwboot knows how to boot from softraid,
but at the moment it appears not to work other than sd0/sd1.  Or, if someone
else has a system running where they're booting off of a softraid mirror
on later disks, let me know.  

But, for my use case, I'm just going to drop back to sd0/sd1, which seemed
to work.

Thanks all.

                    - Chris

> I'm seeing an additional error that implies I did something wrong:
>
> {0} ok boot disk2 sr0
>
> Boot device: /pci@0/pci@0/pci@2/scsi@0/disk@2  File and args: sr0
> OpenBSD IEEE 1275 Bootblock 1.4
> >> OpenBSD BOOT 1.12
> ERROR: /iscsi-hba: No iscsi-network-bootpath property
> Bad magic number in disk label
> Can't open disk label package
> Unknown device: sr0
> Cannot boot from softraid: Unknown error: code 19
> Program terminated
> {0} ok
>