* Problem with tape drive: illegal seek
@ 2005-02-25 23:16 Christian Iversen
2005-02-26 3:23 ` Guy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Iversen @ 2005-02-25 23:16 UTC (permalink / raw)
To: linux-scsi
Whenever I use --verify for tar, I get problems. Specifically, I get
"Illegal seek" when tar gets to the verify phase.
I'm trying this on a Compaq SDT-10000 on an Adaptec AHA-3940U2x/395U2x,
according to lspci.
The following simulates my backup script.. to some extend :)
[root@boreas]/tmp #dd if=/dev/urandom of=random-data bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0,324788 seconds (3228493 bytes/sec)
[root@boreas]/tmp #mt rewind
[root@boreas]/tmp #tar --create --verify --file /dev/tape random-data
tar: /dev/tape: Warning: Cannot seek: Illegal seek
[root@boreas]/tmp #dmesg | tail
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
ReiserFS: md0: warning: vs-8115: get_num_ver: not directory item
[root@boreas]/tmp #
Should I look into the buggy'dness of this, or am I doing something wrong?
Please note that I can restore the data just fine, if I use tar. If I try to
use dd, I get strange errors as well:
[root@boreas]/tmp #dd if=/dev/tape of=dump
dd: reading `/dev/tape': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes transferred in 3,699040 seconds (0 bytes/sec)
I hope you can help me.
--
Regards,
Christian Iversen
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Problem with tape drive: illegal seek
2005-02-25 23:16 Problem with tape drive: illegal seek Christian Iversen
@ 2005-02-26 3:23 ` Guy
2005-02-26 8:42 ` Kai Makisara
2005-02-27 12:20 ` Christian Iversen
2 siblings, 0 replies; 4+ messages in thread
From: Guy @ 2005-02-26 3:23 UTC (permalink / raw)
To: 'Christian Iversen', 'linux-scsi'
Your dd issue may be related to block size.
Tar defaults to 10k blocks, dd defaults to 512 bytes blocks.
Try this dd command:
dd if=/dev/tape of=dump bs=10k
No idea about the verify.
Guy
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Christian Iversen
Sent: Friday, February 25, 2005 6:16 PM
To: linux-scsi
Subject: Problem with tape drive: illegal seek
Whenever I use --verify for tar, I get problems. Specifically, I get
"Illegal seek" when tar gets to the verify phase.
I'm trying this on a Compaq SDT-10000 on an Adaptec AHA-3940U2x/395U2x,
according to lspci.
The following simulates my backup script.. to some extend :)
[root@boreas]/tmp #dd if=/dev/urandom of=random-data bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0,324788 seconds (3228493 bytes/sec)
[root@boreas]/tmp #mt rewind
[root@boreas]/tmp #tar --create --verify --file /dev/tape random-data
tar: /dev/tape: Warning: Cannot seek: Illegal seek
[root@boreas]/tmp #dmesg | tail
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO
ReiserFS: md0: warning: vs-8115: get_num_ver: not directory item
[root@boreas]/tmp #
Should I look into the buggy'dness of this, or am I doing something wrong?
Please note that I can restore the data just fine, if I use tar. If I try to
use dd, I get strange errors as well:
[root@boreas]/tmp #dd if=/dev/tape of=dump
dd: reading `/dev/tape': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes transferred in 3,699040 seconds (0 bytes/sec)
I hope you can help me.
--
Regards,
Christian Iversen
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with tape drive: illegal seek
2005-02-25 23:16 Problem with tape drive: illegal seek Christian Iversen
2005-02-26 3:23 ` Guy
@ 2005-02-26 8:42 ` Kai Makisara
2005-02-27 12:20 ` Christian Iversen
2 siblings, 0 replies; 4+ messages in thread
From: Kai Makisara @ 2005-02-26 8:42 UTC (permalink / raw)
To: Christian Iversen; +Cc: linux-scsi
On Sat, 26 Feb 2005, Christian Iversen wrote:
>
> Whenever I use --verify for tar, I get problems. Specifically, I get
> "Illegal seek" when tar gets to the verify phase.
>
I looked at tar 1.13.25 sources and this looks like a tar bug: verify from
tape does not work for the first file (and I am not sure about other
files). After writing, tar tries to skip backwards over two filemarks.
When writing the first file, there is no second filemark to skip over:
this fails and gives you the error. If you do verify with a second call to
tar (tar --compare) after skipping backwards with mt, this should work.
...
> Please note that I can restore the data just fine, if I use tar. If I try to
> use dd, I get strange errors as well:
>
> [root@boreas]/tmp #dd if=/dev/tape of=dump
> dd: reading `/dev/tape': Cannot allocate memory
> 0+0 records in
> 0+0 records out
> 0 bytes transferred in 3,699040 seconds (0 bytes/sec)
>
Guy already solved this problem. The message (Cannot allocate memory) is
not very clear but this is what other Unices use.
--
Kai
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with tape drive: illegal seek
2005-02-25 23:16 Problem with tape drive: illegal seek Christian Iversen
2005-02-26 3:23 ` Guy
2005-02-26 8:42 ` Kai Makisara
@ 2005-02-27 12:20 ` Christian Iversen
2 siblings, 0 replies; 4+ messages in thread
From: Christian Iversen @ 2005-02-27 12:20 UTC (permalink / raw)
To: linux-scsi
Thanks to you both!
Indeed, "dd" works when bs=10k, and tar works as long as you don't try to
auto-compare it. I'll look into using --compare instead, thanks.
I wonder if this is a bug or feature in tar? Should I report it?
--
Regards,
Christian Iversen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-27 12:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-25 23:16 Problem with tape drive: illegal seek Christian Iversen
2005-02-26 3:23 ` Guy
2005-02-26 8:42 ` Kai Makisara
2005-02-27 12:20 ` Christian Iversen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox