On 2/5/06, Brett I. Holcomb <[EMAIL PROTECTED]> wrote:
> Okay, I think I figured out what they are doing.  They have a bunch of files
> for the labels.  If I move forward using asf n where n is a number from 1-n I
> can walk through the label files.  They take two files/label file so I go
> from 1 to 3 to 5 ....
>
> How do I get to this file to untar it?  What I have is this when I do tar
> -tvf /dev/tape0n.
>
> -rw-rw---- 0/0            1994 2004-11-20 20:56:25 /tmp/fs_95.lbl
>
> Thanks.

Sorry for the slow response on this.

It sounds like you don't really know the exact contents of the tapes,
so I think you should do something like:

# dd if=/dev/tape0n of=archive1 bs=10k
# dd if=/dev/tape0n of=archive2 bs=10k
...
# dd if=/dev/tape0n of=archiveN bs=10k

This should give you a dump of all of the data on the tape, and then
you can analyze it in more detail.  You might have to fiddle with the
bs= value above though.

For some background info, tape devices generally write file marks
between archives.  So as long as you are using the no-rewind tape
device and reading the full archive, you can usually just read them
one after the other.  The mt fsf command is mostly useful for skipping
over archives.

However, tape devices are not very consistent.  Sometimes if you read
just part of an archive and close it, the tape will automatically move
to the next file mark.  Other devices will require an mt fsf command
to get to the next file mark.

The asf command sometimes works, and sometimes doesn't.  rewind and
fsf is the safest method.

-Richard


>
>
> On Sunday February 5 2006 23:36, Richard Fish wrote:
> > On 2/5/06, Brett I. Holcomb <[EMAIL PROTECTED]> wrote:
> > > I have a scsi tape library and a backup program that creates datasets of
> > > tar files on the tapes.  I gather each dataset is a tar file.  I would
> > > like to be able to access each of these tar files.  At this point I can
> > > tar -tvf /dev/tape0 and see the file that contains the tape label.  But I
> > > can't get beyond that.  I've tried skipping to the next file, records,
> > > set mark using mt with no luck.
> >
> > mt is the correct command, but you need to make sure you are using a
> > no-rewind tape device (ntape or nst0).  Otherwise you will end up
> > seeking to the next file, closing the file descriptor, which causes
> > the driver to rewind the tape.
> >
> > -Richard
>
> --
>
> Brett I. Holcomb
> --
> [email protected] mailing list
>
>

-- 
[email protected] mailing list

Reply via email to