Problems getting WWID recognized

Rafael David Tinoco rafaeldtinoco at ubuntu.com
Wed Aug 26 15:59:46 UTC 2020


>
> On Wed, Aug 26, 2020 at 09:53:09AM -0300, Rafael David Tinoco wrote:
> > Are you able to inquiry VPD for the LUNs coming from the open solaris
> > storage server ?
>
> Nope. Info below. So what happens if "udevadm info -q all
> --path=/sys/block/sdc" shows ID_SERIAL but "sg_vpd --page=sn
> /dev/sdc" does not?

The ID_SERIAL is filled by the udev rules file. You have to check
which rule is the one creating (or making it to skip the creation of)
the ID_SERIAL. So, if udevadm has the ID_SERIAL, but it is not coming
from the SCSI VPD page, it means that the serial was defined by some
other script/wrapper - then inquiring SCSI VPD pages.

>From 60-persistent-storage.rules we have:

scsi_id --export --whitelisted -d ...

scsi_id comes from /lib/udev/scsi_id and it also gets information from
VPD pages 0x80, 0x83.

If you install sg3-utils-udev package it will create a file called:

/lib/udev/rules.d/55-scsi-sg3_id.rules

that will try to use VPD 0x80 and 0x83 pages for the ID_SERIAL
attribute, but using the sg_inq tool from sg3-tools package.

To answer your question:

If udevadm info shows ID_SERIAL but sg_inq tool does not, it means
that you have an udev rule creating the ID_SERIAL for you. In that
case, you should make changes to udev rules, to make sure they use
correct VPD pages for ID_SERIAL.

Also, take a look at your storage server, making sure that 0x80 and
0x83 pages are available (SBC-4 standards define *at least* VPD 0x80
as mandatory). Check my comment below...

> > $ sudo sg_inq -e /dev/sda
> > VPD INQUIRY, page code=0x00:
> >    Supported VPD pages:
> >      0x0 Supported VPD pages
> >      0x80 Unit serial number
> >      0x83 Device identification
> >
> > $ sudo sg_inq -e --page=0x80 /dev/sda
> > VPD INQUIRY: Unit serial number page
> >   Unit serial number: 4C532000040912113260
>
> # sg_inq -e /dev/sdc
> VPD INQUIRY, page code=0x00:
>    Supported VPD pages:
>      0x0        Supported VPD pages
>      0x80       Unit serial number
>      0x83       Device identification
>      0x86       Extended INQUIRY data
>      0xb0       Block limits (sbc2)
>      0xb2       Logical block provisioning (sbc3)
>
> # sg_inq -e --page=0x80 /dev/sdc
> VPD INQUIRY: Unit serial number page
>   Unit serial number:

Could you try 0x80, 0x83, 0x86 as well ? Nothing there ? If there is
SERIAL coming from your storage server, it is not behaving like
described by SCSI SBC-4 standards.. but you could create a wrapper to
be executed by udev (check bcache-tools package udev rules) that could
get something else from your storage server and define it as
ID_SERIAL.




More information about the ubuntu-users mailing list