[stgt] targets.conf problem, setting up tape drives
Albert Pauw
albert.pauw at gmail.com
Sun Oct 25 12:30:42 CET 2009
Up until now I started up tgt with no targets defined. I then ran a
script to set it up.
Now I want to set it up properly, using the /etc/tgt/targets.conf file
using the example
as a reference.
However, I immediately stumbled onto a problem, defining just one tape
drive works:
<target iqn.2008-09.com.example:server.tape>
<backing-store /root/tapes/notape>
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>
</target>
But defining an extra tape:
<target iqn.2008-09.com.example:server.tape>
<backing-store /root/tapes/notape>
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/tapes/notape>
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>
</target>
generates a problem with tgt-admin:
[root at orange tgt]# service iscsi-target restart
Stopping target framework daemon
Starting target framework daemon
Not a HASH reference at /usr/sbin/tgt-admin line 276.
This is generated because I use the same backing store (a dummy tape
with length 0) which gives problems
in the hash algorithm. If I create an new (dummy) tape with another name
it works fine.
I understand that using the same backing store more than once generally
is a problem, but since I cannot create
a tape device with no tape inserted it poses a problem.
Trying to configure the changer with its elements (picker, tape drives)
poses another challenge, here is my
definition:
<backing-store /root/smc>
lun 4
device-type changer
removable 0
mode_page "0:0:0"
mode_page "2:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0"
mode_page "0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
mode_page "0x1c:0:10:8:0:0:0:0:0:0:0:0:0"
mode_page "0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
mode_page "0x1e:0:2:0:0"
mode_page
"0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0"
vendor_id "STK"
product_id "L700"
product_revr "0001"
scsi_sn "123:456:789:000"
element_type "1,start_address=1,quantity=1"
element_type "2,start_address=1000,quantity=24"
element_type "3,start_address=10,quantity=5"
element_type "4,address=500,tid=1,lun=1"
element_type "4,address=500,tid=1,lun=2"
element_type "4,address=500,tid=1,lun=3"
media_home "/root/tapes"
</backing-store>
Which generates another interesting error message:
[root at orange tgt]# service iscsi-target restart
Stopping target framework daemon
Starting target framework daemon
Multiple 'element_type' definitions in 'backing-store' not allowed!
Check your config file for errors (target:
iqn.2008-09.com.example:server.tape).
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