> Date: Mon, 30 Dec 2019 18:59:35 +1000
> From: Jonathan Matthew <jonat...@d14n.org>
> 
> On Sun, Dec 29, 2019 at 05:58:02AM +0100, Klemens Nanni wrote:
> > On Sun, Dec 29, 2019 at 01:59:38PM +1000, Jonathan Matthew wrote:
> > > I think we have the wrong size for the volume name, hence the difference
> > > between the size reported by the controller and the size of vpg.
> > Indeed, good catch!
> > 
> > OBP's `create-raid*-volume' commands also prompt for names no longer
> > than that:
> > 
> >     {0} ok 9 b c d create-raid0-volume
> >     ...
> >     Enter a volume name:  [0 to 15 characters] foo
> >     {0} ok
> > 
> > > try this out?
> > Just works, the WWID is no longer clobbered and autoconf eventually sees
> > it in the port WWN:
> > 
> >     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
> >     mpii_scsi_probe: target 0 lun 0 port_wwn 0 node_wwn 0 has 
> > MPII_DF_VOLUME set in flags 10
> >     struct mpii_cfg_raid_vol_pg1 vpg:
> >             volume_id: 81, tvolume_bus: 3, volume_ioc: 0
> >             wwid: aa32290d5dcd16c
> >     sd0 at scsibus1 targ 0 lun 0: <LSI, Logical Volume, 3000> 
> > naa.600508e0000000006cd1dcd59022a30a
> >     device_register: RAID:
> >             bp->val[]: 3aa32290d5dcd16c, 0, 0
> >             target: d5dcd16c, sl->target: 0
> >             lun: 0, sl->lun: 0
> >             sl->port_wwn: aa32290d5dcd16c, sl->node_wwn: 0
> > 
> >     sd0: 713824MB, 512 bytes/sector, 1461911552 sectors
> > 
> > Thanks a lot,
> > OK kn
> > 
> > Now I need to work around the first digit's mismatch;  for reasons still
> > unknown to me, official documentation states that the RAID volume WWID's
> > first digit --if it is zero-- must be replaced with three,  so the
> > bootpath contains 3aa32290d5dcd16c whereas the port WWN has the correct
> > aa32290d5dcd16c.
> 
> Here's the Solaris explanation:
> 
> https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h#L195
> 
> I think we should copy what they're doing here, that is, replace the high bits
> with 3 rather than adding 3 to it.  I'm really not sure where we should do
> this though.  Maybe in mpii, but only on sparc64?
> 
> As far as I can tell, the raid controller generates 128 bit WWIDs for raid
> volumes, but only has a 64 bit field to report the ID to the host, so it only
> puts the vendor-specified part here (you can see the last half of the ID 
> string
> printed when sd0 attaches matches sl->port_wwn in reverse).  I think the
> purpose of setting the high 4 bits to 3 is that 3 is not a defined NAA value,
> so you're not going to find a proper WWID coming from other device that will
> match that.

Can you think of a reason why we would care about the exact WWIDs for
these RAID volumes on other architectures?  If not, I'd prefer to
"fix" this in mpii(4) since this sounds like a deficiency in the LSI
firmware.

Reply via email to