>Someone else email me privately and told me the sequence was as follows.
>
>mt -f /dev/nst0 rewind
>mt -f /dev/nst0 fsf 1
>dd if=/dev/nst0 bs=32 skip=1 | tar xvf -
>
>When I try the above, the following is output:
>
>tar: Hmm, this doesn't look like a tar archive

Are you using software compression?  If so, you need to insert a gunzip
in the pipeline:

  dd if=/dev/nst0 bs=32k skip=1 | gunzip | tar xvf -

>Yuri Pismerov replied and mentioned that some versions of Redhat have
>a problem with 'skip' and suggested that I try it like so:
>
>mt -f /dev/nst0 rewind
>mt -f /dev/nst0 fsf 1
>dd if=/dev/nst0 of=/dev/null bs=32 count=1
>dd if=/dev/nst0 bs=32 skip=1 | tar xvf -

Actually, the correct sequence for any OS would be:

  (dd of=/dev/null bs=32k count=1 && dd bs=32k) < /dev/nst0 | ...

This will work for both SystemV tape semantics and BSD.

>which outputs a simple:
>
>dd: /dev/nst0: I/O error
>0+0 records in
>0+0 records out
>
>Which leads me to wonder about the integrity of my tape...

Yup.  Dd is just reporting what the OS told it, which is that the tape
cannot be read.  You might try retensioning the tape, if that's an
option, or start looking at cables, connections, termination, cleaning
the drive, etc.

>Jer

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to