Two things… what did mt tell show BEFORE the first mt rewind? That
command is used after on the failing example and before on the working
example so that doesn’t help much.
Also the ‘| cat >’ is redundant… just replace that whole thing with ‘>’
to write directly to the file.
Good luck.
jedancoek wrote:
> I have scsi LTO3 tape attached / OpenSUSE 11.1
>
> what happens:
>
> linux:~ # dd if=/dev/zero of=dummy_file bs=1M count=5
> 5+0 records in
> 5+0 records out
> 5242880 bytes (5.2 MB) copied, 0.132575 s, 39.5 MB/s
>
> linux:~ # mt -f /dev/nst0 tell
> At block 0.
> linux:~ # tar cvzf /dev/nst0 dummy_file
> dummy_file
> linux:~ # mt rewind
> linux:~ # mt tell
> At block 0.
>
> linux:~ # tar tvzf /dev/nst0
>
> gzip: stdin: not in gzip format
> tar: Child returned status 1
> tar: Error exit delayed from previous errors
> linux:~ #
>
> But…
> linux:~ # tar cvzf - dummy_file | cat > /dev/nst0
> dummy_file
> linux:~ # mt tell
> At block 3.
> linux:~ # mt rewind
> linux:~ # tar tvzf /dev/nst0
> -rw-r–r-- root/root 5242880 2009-11-03 02:29 dummy_file
> linux:~ #
>
> So, if I put it trough pipe it is working, otherwise not.
> Anybody seen something like this?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
“z” - for compression doesn’t make any difference, same behavior is with “cvf” also
with mt options I’ve tried not to be to verbose, thats why I didn’t paste them. Actually, they to show right blocks on the dev/nst0 device. I can move trough the tape forwards and backwards. All the way I can see file blocks position - so that part works.
What does not is the fact that this behavior is totally strange for me. On other boxes, e.g. with RHEL, this actually works as it is supposed to.