将scsi id作为页面0x83的算法

时间:2014-02-27 14:52:14

标签: algorithm scsi

用于创建页面0x83 SCSI id

的算法是什么
# scsi_id --whitelisted --page=0x83  --device=/dev/sdjj
3600a0980443175414a3f4443364d5638
#

在相应的软链接/ dev / disk / by-id / scsi-3600a0980443175414a3f4443364d5638中用于磁盘类型,供应商,型号,串行等,如

# 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
#

我记得几个月前在网上的某个地方看过一个伪代码,但是再也找不到它了:(谢谢!

1 个答案:

答案 0 :(得分:0)

看起来就是这样:

3600a098044316475463f444336434c6e serial (page 0x83 inquiry)
         44316475463f444336434c6e scsi serial (base64.b16encode('D1duF?DC6CLn').lower())
 600a098044316475 WWN
  00a098 OUI (NetApp)
3 scsi disk