Re: Using tgtd to pass through a SCSI tape drive

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

 



On 29/07/10 11:47, FUJITA Tomonori wrote:

All I want to hear is that it actually works well. :)

Possibly it doesn't. I'm using tgt 1.0.6 on Debian Lenny (2.6.26-2-openvz-amd64), and simple reads and positions etc. using 'mt', and 'scsitape' work correctly, but using Bacula's btape "test" function to check tape drive behaviour, I get this (this is using open-iscsi to "loopback" mount the tape drive to the localhost):

bramber:/sys/devices# btape HP-Ultrium2-HU10827R1D
Tape block granularity is 1024 bytes.
btape: butil.c:285 Using device: "HP-Ultrium2-HU10827R1D" for writing.
btape: btape.c:372 open device "HP-Ultrium2-HU10827R1D" (/dev/st1): OK
*test

=== Write, rewind, and re-read test ===

I'm going to write 1000 records and an EOF
then write 1000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape: btape.c:831 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "HP-Ultrium2-HU10827R1D" (/dev/st1)
btape: btape.c:847 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "HP-Ultrium2-HU10827R1D" (/dev/st1)
btape: btape.c:856 Rewind OK.
btape: btape.c:881 Bad data in record. Expected 1, got 2000 at byte 0. Test failed!

At the same time, I get this from the kernel:

[3034458.454685] mptscsih: ioc0: attempting task abort! (sc=ffff810107150d40) [3034458.466570] st 1:0:3:0: CDB: Write Filemarks: 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
[3034458.476705] mptscsih: ioc0: task abort: SUCCESS (sc=ffff810107150d40)
[3034462.137144] mptscsih: ioc0: attempting task abort! (sc=ffff81012bcf6d00) [3034462.141149] st 1:0:3:0: CDB: Write Filemarks: 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
[3034462.278591] mptscsih: ioc0: task abort: FAILED (sc=ffff81012bcf6d00)
[3034462.285164] mptscsih: ioc0: attempting target reset! (sc=ffff81012bcf6d00) [3034462.290599] st 1:0:3:0: CDB: Write Filemarks: 10 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
[3034462.696560] mptscsih: ioc0: target reset: SUCCESS (sc=ffff81012bcf6d00)
[3034464.841118] mptscsih: ioc0: attempting task abort! (sc=ffff810105be1700) [3034464.848029] st 1:0:3:0: CDB: Rezero Unit/Rewind: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[3034464.993971] mptscsih: ioc0: task abort: FAILED (sc=ffff810105be1700)
[3034464.997976] mptscsih: ioc0: attempting target reset! (sc=ffff810105be1700) [3034465.005973] st 1:0:3:0: CDB: Rezero Unit/Rewind: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[3034465.404665] mptscsih: ioc0: target reset: SUCCESS (sc=ffff810105be1700)
[3034467.598366] mptscsih: ioc0: attempting task abort! (sc=ffff81012a8655c0) [3034467.606354] st 1:0:3:0: CDB: Read(6): 08 00 00 fc 00 00 00 00 00 00 00 00 00 00 00 00
[3034467.736484] mptscsih: ioc0: task abort: FAILED (sc=ffff81012a8655c0)
[3034467.741514] mptscsih: ioc0: attempting target reset! (sc=ffff81012a8655c0) [3034467.752039] st 1:0:3:0: CDB: Read(6): 08 00 00 fc 00 00 00 00 00 00 00 00 00 00 00 00
[3034468.149924] mptscsih: ioc0: target reset: SUCCESS (sc=ffff81012a8655c0)



Running the same test on the underlying device seems to work correctly as expected.

Do I need to be build tgt from version control, or be using a newer kernel, or something?

I can also double-check using scst's passthrough, if you like....

Thanks,

Tim.
--
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