[stgt] Problem: automatic vtl setup using targets.conf vs script, failing on automatic
Mark Harvey
markh794 at gmail.com
Wed Nov 4 08:48:54 CET 2009
Albert Pauw wrote:
> Mark Harvey wrote:
>>
>> I've had a really, really quick look & didn't spot anything.
>> Since then, I've been layed up in bed for a couple of days.
>> Now I'm elbow-deep in paint (house renos)..
>>
>> Tomorrow will be the soonest I'll have a chance..
>>
>> Cheers
>> Mark
> Sorry Mark,
>
> didn't really wanted to bother you, sorry to hear you were ill.
>
> Have you been actually able to reproduce the problem?
> Quite simply:
>
> - use the targets.conf I sent earlier
> - start up tgt manually, tgt -d8 -f
> - tgt-admin -e -v to set up the vtl using targets.conf
> - login with iscsi
> - now try to get the status of the changer (mtx -f /dev/changer status)
>
> What happened with me is that tgtd dies. I don't know if my previous
> email,
> regarding the malformed scsi packet, has anything to do with it. I
> assume not
> as when I set it all up using standard scripts it does work (with
> malformed packets).
> Mind you, according to wireshark the only malformed packets are when
> the status
> of the changer elements are send back to the initiator.
>
OK, looks like I'm failing step 1. :(
I created /root/btapes/notape[123] and a 'touch /root/smc' file(s).
I've not used the perl tgt-adm before..
# tgt-admin -e -v
[snip]
# Write cache is enabled (default) for lun 2.
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 3 -b
/root/btapes/notape3 --device-type tape
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params scsi_sn="HUM1A00003"
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params scsi_id="HP LTO3 ULTRIUM"
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params product_id="LTO3 ULTRIUM"
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params removable="1"
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params vendor_id="HP"
tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=3
--params product_rev="0001"
# Write cache is enabled (default) for lun 3.
Multiple 'params' definitions in 'backing-store' not allowed!
Check your config file for errors (target:
iqn.2008-09.com.example:server.tape).
root at l-034246:~# cat /etc/tgt/targets.conf
# Empty targets configuration file -- please see the package
# documentation directory for an example.
# Empty targets configuration file -- please see the package
# documentation directory for an example.
include /etc/tgt/temp/*.conf
default-driver iscsi
<target iqn.2008-09.com.example:server.tape>
allow-in-use yes
<backing-store /root/btapes/notape1>
lun 1
device-type tape
removable 1
vendor_id "HP"
product_id "LTO3 ULTRIUM"
product_rev "0001"
scsi_sn "HUM1A00001"
scsi_id "HP LTO3 ULTRIUM"
</backing-store>
<backing-store /root/btapes/notape2>
lun 2
device-type tape
removable 1
vendor_id "HP"
product_id "LTO3 ULTRIUM"
product_rev "0001"
scsi_sn "HUM1A00002"
scsi_id "HP LTO3 ULTRIUM"
</backing-store>
<backing-store /root/btapes/notape3>
lun 3
device-type tape
removable 1
vendor_id "HP"
product_id "LTO3 ULTRIUM"
product_rev "0001"
scsi_sn "HUM1A00003"
scsi_id "HP LTO3 ULTRIUM"
</backing-store>
<backing-store /root/smc>
lun 4
device-type changer
removable 1
vendor_id "STK"
product_id "L700"
product_rev "0001"
scsi_sn "123:456:789:000"
# Dummy 'page 0'
mode_page "0:0:0"
# Page 0x02: Disconnect/Reconnect SPC-3
mode_page "0x02:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0"
# Page 0x1a: Power Condition SPC-3
mode_page "0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
# Page 0x1c: Informational Exceptions Control SPC-3
mode_page "0x1c:0:10:8:0:0:0:0:0:0:0:0:0"
# Page 0x1d: Element Address Assignment SMC-3 7.3.4
mode_page "0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
# Page 0x1e: Transport Geometry Parameters SMC-3 7.3.5
mode_page "0x1e:0:2:0:0"
# Page 0x1f: Device Capabilities SMC-3 7.3.2
# Page 0x1f/Subpage 0x41: Extended Device Capabilities SMC-3 7.3.3
mode_page
"0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0"
# Type 1: Medium Transport Elements (robot arm/picker)
params
element_type=1,start_address=1,quantity=1,media_home=/root/btapes
# Type 2: Storage Elements (tape slots)
params
element_type=2,start_address=1000,quantity=24,media_home=/root/btapes
# Type 3: Import/Export Elements (CAP)
params
element_type=3,start_address=10,quantity=5,media_home=/root/btapes
# Type 4: Add Data Transfer devices (drives)
params
element_type=4,start_address=500,quantity=3,media_home=/root/btapes
params element_type=4,address=500,tid=1,lun=1
params element_type=4,address=500,tid=1,lun=2
params element_type=4,address=500,tid=1,lun=3
</backing-store>
</target>
> Cheers,
>
> Albert
>
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list