Tape Libraries and Drives
cancel
Showing results for 
Search instead for 
Did you mean: 

Linux: is my tape defective or there is another error?

uxbeginner22
Trusted Contributor

Linux: is my tape defective or there is another error?

I want to make an encrypted backup

I have this sas controller

06:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)

and this tape drive

[9:0:4:0]    tape    HP       Ultrium 5-SCSI   Z6ED  /dev/st0   -        

 

Using this cli

tar cvf - --format posix -X /home/user/altro/file.esclude /home/user | openssl aes-256-cbc -salt  -k "pass" | dd bs=40M of=/dev/st0

Give me this error after 15-30 minutes

[mar apr 11 21:05:54 2017] st 9:0:3:0: [st0] Block limits 1 - 16777215 bytes.
[mar apr 11 21:25:37 2017] st 9:0:3:0: device_block, handle(0x0009)
[mar apr 11 21:25:37 2017] st 9:0:3:0: [st0] Error e0000 (driver bt 0x0, host bt 0xe).
[mar apr 11 21:25:39 2017] st 9:0:3:0: device_unblock and setting to running, handle(0x0009)
[mar apr 11 21:25:39 2017] st 9:0:3:0: [st0] Error 10000 (driver bt 0x0, host bt 0x1).
[mar apr 11 21:25:39 2017] st 9:0:3:0: [st0] Error on write filemark.
[mar apr 11 21:25:39 2017] st 9:0:3:0: [st0] Error 10000 (driver bt 0x0, host bt 0x1).
[mar apr 11 21:25:39 2017] mpt2sas_cm0: removing handle(0x0009), sas_addr(0x5001438000aa4a64)
[mar apr 11 21:25:39 2017] mpt2sas_cm0: removing : enclosure logical id(0x500605b0080ad4d0), slot(3)
[mar apr 11 21:25:43 2017] scsi 9:0:4:0: Sequential-Access HP       Ultrium 5-SCSI   Z6ED PQ: 0 ANSI: 6
[mar apr 11 21:25:43 2017] scsi 9:0:4:0: SSP: handle(0x0009), sas_addr(0x5001438000aa4a64), phy(3), device_name(0x5001438000aa4a66)

Is my tape reader broken..or is only a bad command error?

 

 

6 REPLIES
Curtis_Ballard
Valued Contributor

Re: Linux: is my tape defective or there is another error?

I've never tried using a command like this to create an encrypted backup.  The tape drive has built in encryption and there are SCSI commands that can send an encryption key but I don't know of a Linux utility to send those commands.  Maybe sg_raw in sgutils if you want to try building a custom command.

With a quick scan of your command line one thing jumped out at me right away: dd bs=40M of=/dev/st0

That is too large of a blocksize.  For tape bs=256K is usually fine, bs=512K is a bit higher performance but there are some HBAs that either don't support that size or require special configurations to support it.

uxbeginner22
Trusted Contributor

Re: Linux: is my tape defective or there is another error?

On linux there is stenc for hw encryption

I will try later..

Now I'm tryng cpio..but it fails,it rewind tape after 400

-500G(the tape is 1500G not compressed).

I use this cli for cpio

find /mydir|cpio --block-size 1024 -ovc > /dev/st0
uxbeginner22
Trusted Contributor

Re: Linux: is my tape defective or there is another error?

The command

dd if=/dev/st0 of=file ibs=2048k

Stop at 256GB and tape is 1.,5T

uxbeginner22
Trusted Contributor

Re: Linux: is my tape defective or there is another error?

And give error..i forgot

 

dmesg said

[mar apr 11 23:51:43 2017] st 9:0:0:0: [st0] Sense Key : 0x3 [current]
[mar apr 11 23:51:43 2017] st 9:0:0:0: [st0] ASC=0x11 ASCQ=0x0 

dd said

dd if=/dev/st0 of=file  ibs=2048k

dd: errore leggendo '/dev/st0': Errore di input/output

0+438583 record dentro

449108992+0 record fuori

229943803904 bytes (230 GB, 214 GiB) copied, 2072,68 s, 111 MB/s
Curtis_Ballard
Valued Contributor

Re: Linux: is my tape defective or there is another error?

[mar apr 11 23:51:43 2017] st 9:0:0:0: [st0] Sense Key : 0x3 [current]
[mar apr 11 23:51:43 2017] st 9:0:0:0: [st0] ASC=0x11 ASCQ=0x0 

The error you describe is a Medium Error (Sense Key 0x03) and specifically is an unrecovered read error  (ASC/ASCQ 0x11/0x00).  That points to a problem with the tape, possibly the drive that wrote the tape.

uxbeginner22
Trusted Contributor

Re: Linux: is my tape defective or there is another error?

Yes I think is defective drive

because I have two lto-5 different tape..

and with both tapes give me errors