On Wed, Oct 05, 2022 at 12:10:26AM +0000, Klemens Nanni wrote:
> On Sun, Sep 25, 2022 at 12:59:27AM +0000, Klemens Nanni wrote:
> > On a sparc64 T4-2 I boot OpenBSD from hardware RAID 1E using the
> > built-in controller:
> >
> > mpii0 at pci15 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: msi
> > mpii0: Solana On-Board, firmware 9.0.0.0 IR, MPI 2.0
> > scsibus1 at mpii0: 834 targets
> > sd0 at scsibus1 targ 0 lun 0: <LSI, Logical Volume, 3000>
> > naa.600508e0000000006cd1dcd59022a30a
> > sd0: 713824MB, 512 bytes/sector, 1461911552 sectors
> > root on sd0a (efde5b2c6ab7b8ac.a) swap on sd0b dump on sd0b
> >
> > But OpenBSD shows it as RAID10, which is misleading:
> >
> > # bioctl mpii0
> > Volume Status Size Device
> > mpii0 0 Online 748498714112 sd0 RAID10
> > 0 Online 500107861504 0:2.0 noencl <ATA
> > CT500MX500SSD1>
> > 1 Online 500107861504 0:1.0 noencl <ATA
> > CT500MX500SSD1>
> > 2 Online 500107861504 0:0.0 noencl <ATA
> > CT500MX500SSD1>
> >
> > Turns out the driver reports it like that and adapting the tool is
> > trivial.
> >
> > Document 1E support, report 1E as 0x1E (like softraid(4) 1C being 0x1C)
> > and print it as such.
> >
> > This merely supports printing it; softraid code has nothing to do with
> > what hardware supports and the create/write path remains unchanged in
> > driver/softraid/bioctl land.
> >
> > Format strings for different RAID levels start identical up to the level
> > specifics, so hoist the identical part while here to make this clearer
> > and simplify/shorten it.
> >
> > # ./obj/bioctl mpii0
> > Volume Status Size Device
> > mpii0 0 Online 748498714112 sd0 RAID1E
> > 0 Online 500107861504 0:2.0 noencl <ATA
> > CT500MX500SSD1>
> > 1 Online 500107861504 0:1.0 noencl <ATA
> > CT500MX500SSD1>
> > 2 Online 500107861504 0:0.0 noencl <ATA
> > CT500MX500SSD1>
> >
> > Feedback? OK? (for after release)
>
> Ping.
Anyone?
Index: sys/dev/pci/mpii.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/mpii.c,v
retrieving revision 1.143
diff -u -p -r1.143 mpii.c
--- sys/dev/pci/mpii.c 16 Apr 2022 19:19:59 -0000 1.143
+++ sys/dev/pci/mpii.c 5 Oct 2022 00:09:17 -0000
@@ -3423,6 +3423,8 @@ mpii_ioctl_vol(struct mpii_softc *sc, st
bv->bv_level = 1;
break;
case MPII_CFG_RAID_VOL_0_TYPE_RAID1E:
+ bv->bv_level = 0x1E;
+ break;
case MPII_CFG_RAID_VOL_0_TYPE_RAID10:
bv->bv_level = 10;
break;
Index: share/man/man4/mpii.4
===================================================================
RCS file: /cvs/src/share/man/man4/mpii.4,v
retrieving revision 1.15
diff -u -p -r1.15 mpii.4
--- share/man/man4/mpii.4 19 Jun 2018 10:43:21 -0000 1.15
+++ share/man/man4/mpii.4 5 Oct 2022 00:09:17 -0000
@@ -59,11 +59,12 @@ Lenovo N2215, ThinkSystem 430
LSI SAS 9200-8e, SAS 9207-8i, SAS 9211-4i, SAS 9211-8i
.It
Broadcom SAS 9300, HBA 9400
+.It
+Oracle SPARC T Series Platforms
.El
.Pp
Some models of these controllers carry an Integrated RAID (IR) firmware
-providing support for RAID 0, RAID 1, RAID10 or RAID5 using SAS or SATA
-drives.
+providing support for RAID levels 0, 1, 1E, 5 or 10 using SAS or SATA drives.
All RAID configuration is done through the controllers' BIOSes.
.Sh SEE ALSO
.Xr bio 4 ,
Index: sbin/bioctl/bioctl.c
===================================================================
RCS file: /cvs/src/sbin/bioctl/bioctl.c,v
retrieving revision 1.149
diff -u -p -r1.149 bioctl.c
--- sbin/bioctl/bioctl.c 26 Aug 2022 09:14:00 -0000 1.149
+++ sbin/bioctl/bioctl.c 18 Oct 2022 06:04:25 -0000
@@ -492,25 +492,23 @@ bio_inq(char *name)
else
snprintf(size, sizeof size, "%14llu",
bv.bv_size);
+ printf("%11s %-10s %14s %-7s ",
+ volname, status, size, bv.bv_dev);
switch (bv.bv_level) {
case 'C':
- printf("%11s %-10s %14s %-7s CRYPTO%s%s\n",
- volname, status, size, bv.bv_dev,
+ printf("CRYPTO%s%s\n",
percent, seconds);
break;
case 'c':
- printf("%11s %-10s %14s %-7s CONCAT%s%s\n",
- volname, status, size, bv.bv_dev,
+ printf("CONCAT%s%s\n",
percent, seconds);
break;
case 0x1C:
- printf("%11s %-10s %14s %-7s RAID%X%s%s %s\n",
- volname, status, size, bv.bv_dev,
+ printf("RAID%X%s%s %s\n",
bv.bv_level, percent, seconds, cache);
break;
default:
- printf("%11s %-10s %14s %-7s RAID%u%s%s %s\n",
- volname, status, size, bv.bv_dev,
+ printf("RAID%u%s%s %s\n",
bv.bv_level, percent, seconds, cache);
break;
}