Hi Albert, The 'scsi_id' is used to set SCSI Inquiry Vital Product Data (VPD) Page 0x83 - Device Identification. The 'scsi_sn' is used to set SCSI Inquiry VPD Page 0x80 - Unit Serial Number. The 'vendor_id' is used to set the Vendor Identification in the standard INQUIRY data (IBM, Quantum etc) The 'product_id' is used to set the Product Identification in the standard INQUIRY data (Device model - SDLT600 etc) The 'product_rev' is used to set the Product Revision (firmware) version in the standard INQUIRY data. The spc module is currently identifying the data in 'T10 vendor ID" format which the 'sg_inq' was attempting to interpret and decode. Note: Earlier releases of sg_inq did not attempt to interpret the information. I have update the spc code to return data in "Vendor Unique" format and will submit a patch later. VPD Page 0x83 is not used by most user-space utilities The SCSI Inquiry command requires further work to expand the sort of information that can be returned by different logical units. Cheers Mark Albert Pauw wrote: > I noticed something inconsistent (or so it seems). > > If I define something like this: > > tgtadm --lld iscsi --mode logicalunit --op update --tid 2 --lun 1 > --params > vendor_id=MITSUMI,product_id=FD001,product_rev=0001,removable=1,sense_format=0 > > tgtadm --lld iscsi --mode logicalunit --op update --tid 2 --lun 1 > --name scsi_id --value "CDROM ISO" > tgtadm --lld iscsi --mode logicalunit --op update --tid 2 --lun 1 > --name scsi_sn --value "001" > > and log into that target (using open-iscsi) I get in my dmesg: > > scsi2 : iSCSI Initiator over TCP/IP > scsi 2:0:0:0: RAID IET Controller 0001 PQ: 0 > ANSI: 5 > scsi 2:0:0:0: Attached scsi generic sg2 type 12 > scsi 2:0:0:1: CD-ROM MITSUMI FD001 0001 PQ: 0 > ANSI: 5 > sr1: scsi-1 drive > sr 2:0:0:1: Attached scsi CD-ROM sr1 > sr 2:0:0:1: Attached scsi generic sg3 type 5 > > However, if I use the command: > > tgtadm --lld iscsi --op show --mode target > > it shows up as (part of it at least): > > LUN: 1 > Type: cd/dvd > SCSI ID: CDROM ISO > SCSI SN: 001 > Size: 628M > Online: Yes > Poweron/Reset: No > Removable media: Yes > > so the scsi_id and scsi_sn are not used on the initiator and never > turn up, it's the vendor_id and product_id that show up. > > Can somebody shed some light on this (seemingly) inconsistent behaviour? > > Thanks, > > Albert > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Stgt-devel mailing list > Stgt-devel at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/stgt-devel > |