openSUSE Forums > Applications » tar & tape problem

Go Back   openSUSE Forums > Applications
Forums FAQ Members List Search Today's Posts Mark Forums Read


Applications Questions about desktops (KDE, Gnome, XFCE, etc.), software applications (configuration, usage, bugs, documentation)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-Nov-2009, 19:47
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 4
jedancoek hasn't been rated much yet
Default tar & tape problem

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?
Reply With Quote
  #2 (permalink)  
Old 02-Nov-2009, 20:16
malcolmlewis's Avatar
Global Moderator
 
Join Date: Jun 2008
Location: Podunk
Posts: 4,715
malcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputationmalcolmlewis has great reputation
Default Re: tar & tape problem

Quote:
Originally Posted by jedancoek
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?
Hi
Never tried with the z option only ever used cvf on both linux and
solaris. Don't have a tape drive hooked up on this machine anymore

What happens if you don't use the z option?

--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 6:47, 3 users, load average: 1.35, 1.37, 1.12
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Reply With Quote
  #3 (permalink)  
Old 02-Nov-2009, 22:04
Explorer Penguin
 
Join Date: Apr 2009
Posts: 691
ab@novell.com hasn't been rated much yet
Default Re: tar & tape problem

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/

iQIcBAEBAgAGBQJK76vjAAoJEF+XTK08PnB56EYP/AhrIpcans8jlks+jxBmQnwx
lG8sUluXDM5r4VQH9sXHrKfipzK+GfZ3tZcsrWyB75Q0aLs5AL sh68X4B49Z7UkY
FPQiBMIw+JPXje+eaFIvFfro/yEgT5JLA0tuWKaM7UecgQZ3qPc18YbgjwF38yqM
fw1/a7+BkQfvuCHDGHWHZOPbyAIYhngtmp7KD2bNds+CZE6tXHuxNv BM0gz5TTL8
OzZgrh8Ke7KP3VJGJXnRXSibeXOCikWqwuYkV/gk9iL1T5/gtxtXl50XgfWSk8OE
2dT//pHJHdfDQ9CYH6Ics0HpHEah/vRP1kTXFwurlEAjMGzSja+bGOroMKZqu+cH
yQ96VGsrJ54phd59pyMGO0dKAIs0EAANDGCqC+Gtmlfc5J9BW1 9tXhLeakD3WLmY
+k3RP2/aaeco6cd7/Gb6UhdK1SiEkuJn0OYmQlpDn/X4Kq7/x8Dlmzks0c/j3GO5
lXZljaywcLgYKxwzoW1qtccje74uZHoIj2ODVDDdvevAcaJKNo beS2a9l11dR9eQ
89/zrJqb+uVjKCsy185Zu/1L4q6B5z4AhgzWn/erD/fdEcHnnAHerx4xZ2iuEZjz
xQInxJFmV4b1HGDfLo2qoG34WEeIO9ODwdB4p2HtJwAVBvVKsu GpZ8Gap9+LoPYG
GNBw9r6rZ9Y5xzTdlzXd
=IDBk
-----END PGP SIGNATURE-----
Reply With Quote
  #4 (permalink)  
Old 03-Nov-2009, 03:20
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 4
jedancoek hasn't been rated much yet
Default Re: tar & tape problem

thanx guys,

lets give more info about the subject:
- "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.
Reply With Quote
Reply

Bookmarks

Tags
error, gzip, pipe, tape, tar


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2