[Stgt-devel] Inconsistency in usage of scsi_id and iscsi_sn?

Albert Pauw albert.pauw
Tue Aug 7 13:01:50 CEST 2007


Mark Harvey wrote:
> Try a 'lsscsi -g' and then a "sg_inq -v /dev/sg??' where ?? is the sg 
> path returned from 'lsscsi -g'
> And
> sg_inq -p 80 /dev/sg??
> sg_inq -p 83 /dev/sg??
>
> Some of the parameters are used inq params 80, 83 etc
>
> I need to refer back to the code to identify exactly where each param 
> is used. (A follow up email tomorrow).
>
> Note: lsscsi & sg3_utils available from www.torque.net/sg/
>
> Cheers
> Mark
[root at orange ~]# sg_inq -v /dev/sg3
    inquiry cdb: 12 00 00 00 24 00
standard INQUIRY:
    inquiry cdb: 12 00 00 00 42 00
  PQual=0  Device_type=5  RMB=1  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=1]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TGPS=0  3PC=0  Protect=0  BQue=0
  EncServ=0  MultiP=0  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  Linked=0  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=66 (0x42)   Peripheral device type: cd/dvd
 Vendor identification: MITSUMI
 Product identification: FD001
 Product revision level: 0001
    inquiry cdb: 12 01 00 00 fc 00
    inquiry: requested 252 bytes but got 7 bytes
    inquiry cdb: 12 01 80 00 fc 00
    inquiry: requested 252 bytes but got 12 bytes
 Unit serial number: 001

[root at orange ~]# sg_inq -p 0x83 /dev/sg3
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 28
    id_type: T10 vendor identification,  code_set: Binary
    associated with the addressed logical unit
      vendor id: CDROM IS
      vendor specific: O

[root at orange ~]# sg_inq -p 0x80 /dev/sg3
VPD INQUIRY: Unit serial number page
  Unit serial number: 001

By the way, as you can see it's sg_inq -p 0x80/0x83 (hex, not decimal) 
but that was easy to figure out.
If you look at the vendor id and vendor specific of the -p 0x83, then it 
looks like the scsi_id is send,
but in a wrong way. The scsi_id was set up as "CDROM ISO", here you can 
see that vendor id is seen
as "CDROM IS" and vendor specific as "O?.

Albert





More information about the stgt mailing list