[stgt] how to setup a virtual tape using scsi-target-utils?
ronnie sahlberg
ronniesahlberg at gmail.com
Mon Jul 16 23:32:26 CEST 2012
Can you verify that the tgtd target is running properly ?
Just try to start it manually as root as :
killall -9 tgtd
tgtd
and verify it is running by netstat -tapn | grep 3260
On Tue, Jul 17, 2012 at 5:25 AM, Rob Evers <revers at redhat.com> wrote:
> On 07/13/2012 07:08 PM, ronnie sahlberg wrote:
>>
>> Hi,
>>
>> If you just want to create a tape drive with a tape loaded, these
>> commands should work :
>>
>> # create a blank tape
>> tgtimg --op new --device-type tape --barcode 12345 --size 100 --type
>> data --file /data/tape001.img
>>
>>
>> # create a target
>> tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.ronnie.test
>>
>> # create a SSC LUN for with the blank tape above loaded into the device
>> tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b
>> /data/tape001.img --device-type=tape
>>
>
> I get 'tgtadm: invalid request when trying to create the LU
>
> # tgtimg --op new --device-type tape --barcode 12345 --size 100 --type data
> --file /data/tape001.img
> blk_sz: 100, next 1152, 1152
> Sizeof(mam): 1104, sizeof(h): 48
> # tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.ronnie.test
> tgtadm: can't send the request to the tgt daemon, Transport endpoint is not
> connected
>
> At this, I did 'service tgtd restart'
>
> # tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.ronnie.test
> # tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b
> /data/tape001.img --device-type=tape
> tgtadm: invalid request
> #
>
> # tgtimg --help
> Usage: tgtimg [OPTION]
> Linux SCSI Target Framework Image File Utility, version 1.0.24
>
> [root at rhel-storage-03 ~]# tgtadm --help
> Usage: tgtadm [OPTION]
> Linux SCSI Target Framework Administration Utility, version 1.0.24
>
>
> This is all after a fresh reboot.
>
> Am I still missing something?
>
> Rob
>
--
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