[Stgt-devel] Bugreport - tgtadm --param scsi_id= and scripts

Albert Pauw albert.pauw
Mon Jul 28 11:44:38 CEST 2008


Just noticed the following with my tgtadm script:

This is what I have in the script:

TID=1
LUN=4
ID="LTO2 ULTRIUM"
SN=0104
tgtadm --lld iscsi --mode logicalunit --op update --tid $TID --lun $LUN 
--params 
vendor_id=STGT,product_id=Tape,product_rev=1.01,scsi_id=$ID,scsi_sn=$SN,removable=1

Unfortunately, that gives with the tgtadm -m target -o show command the 
following result:

            Type: tape
            SCSI ID: deadbeaf1:4
            SCSI SN: beaf14
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store: /root/01/tape.bin

The shell will expand the tgtadm line to

tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 
--params vendor_id=STGT,product_id=Tape,product_rev=1.01,scsi_id=LTO2 
ULTRIUM,scsi_sn=0104,removable=1

leaving a space between LTO and ULTRIUM, which gives tgtadm a hard time. 
If I change in the line scsi_id="LTO2 ULTRIUM" then it works fine.

Obviously, tgtadm sees the space (without quotes) as a parameter 
separater and doesn't even process the stuff after the space properly. I 
guess solving this is quite tricky, but I wanted
to mention it anyway.

Albert



More information about the stgt mailing list