Pregunta

What is the algorithm used to create page 0x83 SCSI id

# scsi_id --whitelisted --page=0x83  --device=/dev/sdjj
3600a0980443175414a3f4443364d5638
#

that is used in the corresponding soft link /dev/disk/by-id/scsi-3600a0980443175414a3f4443364d5638 out of the disk type, vendor, model, serial etc. as in

# scsi_id -g -x /dev/sdjj
ID_SCSI=1
ID_VENDOR=NETAPP
ID_VENDOR_ENC=NETAPP\x20\x20
ID_MODEL=LUN_C-Mode
ID_MODEL_ENC=LUN\x20C-Mode\x20\x20\x20\x20\x20\x20
ID_REVISION=8200
ID_TYPE=disk
ID_SERIAL_RAW="3600a0980443175414a3f4443364d5638"
ID_SERIAL=3600a0980443175414a3f4443364d5638
ID_SERIAL_SHORT=600a0980443175414a3f4443364d5638
ID_WWN=0x600a098044317541
ID_WWN_VENDOR_EXTENSION=0x4a3f4443364d5638
ID_WWN_WITH_EXTENSION=0x600a0980443175414a3f4443364d5638
ID_SCSI_SERIAL=D1uAJ?DC6MV8
#
# scsi_id --whitelisted --page=0x80  --device=/dev/sdjj
SNETAPP  LUN C-Mode     D1uAJ?DC6MV8
#

I remember seeing a pseudo code somewhere on the web couple of month ago, but can no longer find it :( Thanks!

¿Fue útil?

Solución

Looks like this is how it goes:

3600a098044316475463f444336434c6e serial (page 0x83 inquiry)
         44316475463f444336434c6e scsi serial (base64.b16encode('D1duF?DC6CLn').lower())
 600a098044316475 WWN
  00a098 OUI (NetApp)
3 scsi disk
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top