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

Mark Harvey markh794
Tue Aug 7 12:51:32 CEST 2007


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

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
>   




More information about the stgt mailing list