Re: targets.conf problem, setting up tape drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/26/2009 02:43 PM, Tomasz Chmielewski wrote:
Albert Pauw wrote:
I seem to have problems with your patch:

[root@orange scripts]# patch -p0 < patch.eml
patching file /usr/sbin/tgt-admin
patch: **** malformed patch at line 13: }

Could you send me the tgt-admin file directly?

Attached.

It looks like it is working, but there are a few weird things, here is my tgt-admin -e -v output:

[root@orange ~]# tgtd
[root@orange ~]# ps -ef | grep tgtd
root      2818     1  0 15:03 ?        00:00:00 tgtd
root      2819  2818  0 15:03 ?        00:00:00 tgtd
root      2821  2450  0 15:03 pts/0    00:00:00 grep tgtd
[root@orange ~]# tgt-admin -e -v
# Adding target: iqn.2008-09.com.example:server.tape
tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2008-09.com.example:server.tape tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 4 -b /root/smc --device-type changer tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params scsi_sn="123:456:789:000" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params vendor_id="STK" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params product_rev="0001" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=1,start_address=1,quantity=1,media_home=/root/tapes" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=2,start_address=1000,quantity=24,media_home=/root/tapes" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=3,start_address=10,quantity=5,media_home=/root/tapes" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=4,start_address=500,quantity=3,media_home=/root/tapes" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=4,address=500,tid=1,lun=1" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=4,address=500,tid=1,lun=2" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params "element_type=4,address=500,tid=1,lun=3" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params removable="0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params product_id="L700" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x02:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x1c:0:10:8:0:0:0:0:0:0:0:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x1e:0:2:0:0" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=4 --params mode_page="0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0"
# Write cache is enabled (default) for lun 4.
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /root/tapes/notape1 --device-type tape tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params scsi_sn="HUM1A00001" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params scsi_id="HP LTO3 ULTRIUM" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params product_id="LTO3 ULTRIUM" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params removable="1" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params vendor_id="HP" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=1 --params product_rev="0001"
# Write cache is enabled (default) for lun 1.
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 -b /root/tapes/notape2 --device-type tape tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params scsi_sn="HUM1A00002" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params scsi_id="HP LTO3 ULTRIUM" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params product_id="LTO3 ULTRIUM" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params removable="1" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params vendor_id="HP" tgtadm --lld iscsi --op update --mode logicalunit --tid 1 --lun=2 --params product_rev="0001"
# Write cache is enabled (default) for lun 2.
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 3 -b /root/tapes/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.
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL


First, you can see that I used double quotes in defining e.g. scsi_sn, which works. E.g. for one drive I have:
<backing-store /root/tapes/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>

Your extra bits for element_type didn't accepted that, so I removed the double quotes which worked.
To explain it a bit more clearly, this didn't work:
        params element_type="4,address=500,tid=1,lun=3"
But this did:
        params element_type=4,address=500,tid=1,lun=3


When I logged into the created target using open-iscsi I get all the devices fine, however an "mtx -f /dev/changer status"
hangs. I am using Fedora 11, and this worked fine before.


--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux