[Ilugc] tar question

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Tue Feb 23 18:59:12 2010

On Tue, Feb 23, 2010 at 3:50 PM, Arun Khan <knura9@xxxxxxxxx> wrote:

I have received a LTO4 tape with supposedly many many files (the
client claims that).

However, when I do:
? ? ? ? ?tar xvpRf /dev/st0
I get one and only one file out of the tape. ?(ditto for /dev/nst0)

Try this:
    mt -f /dev/nst0 rewind
    tar xf /dev/nst0
    mt -f /dev/nst0 fsf 1
    tar xf /dev/nst0
    ...

See mt(1).  You can replace tar with dd to copy the tar files to disk before
untaring later on.


Anyway, I have replaced  the /dev/mt...  string  with /dev/nst0 as
well as /dev/st0 but the result is the same.
The while being always true it keeps looping and the same file is extracted.

Looks like your tape driver is "rewinding the tape on close".  Check st(4).
/dev/nst0 will not auto rewind the tape on close, but /dev/st0 will.


- Raja

Other related posts: