Tape dumping programs for Unix/Linux...

From: Stan Sieler <sieler_at_allegro.com>
Date: Fri May 3 14:10:42 2002

Re:

> Look for a program named "copytape". It copies tapes including the
> block structure, file marks, etc. Unlike dd(1) which only really
> works if all blocks are the same size and there is only one file
> on the tape. It can copy tape-drive to tape-drive or tape-drive to
> disk file, and puts markers in the disk file to indicate the
> structure of the data on the tape.
>

The versions I found do a fair job of copying a tape...but not
a complete job (particularly for DDS and DLT tapes).

Why?

It doesn't know about "setmark".

On a DDS (DAT) drive, you can have a data record (of variable length,
not just multiples of 128 or 256 bytes, BTW), an EOF (end-of-file mark),
a setmark, or an end-of-tape indicator.

>From "man mt" on HP-UX (since at least 1992, so it fits the 10 year rule, too
:)
   DDS format devices also support setmarks which are hierarchically
   superior to filemarks. A setmark is used to delineate a group (set)
   of files. Reading a setmark is also returned as a zero-length read.
   The two can be distinguished by unique bits in the mt_gstat field.

(In fact, #$%^ HP took out the above text from the 10.20 "man mt" doc, leaving
just a bare reminder that setmarks exist)

Who uses setmarks? Backup software that wants to be able to locate
files quickly.

E.g., consider a modified tar/gtar that writes an EOF after every file,
and a setmark after every 1000 files, and also writes s table of contents
(list of files to be backed up) at the start of the tape. If the user
says "restore file FOO", the software can read the table of contents and
determine that FOO is file, say, 2349. It can then issue two "forward setmark"
commands, and then 349 "forward EOF" (or "forward filemark" or "forward space
file") commands to quickly get to the file.

DDS drives can find a setmark very quickly, faster than they can find an EOF.

So....any software trying to *accurately* duplicate a tape should record
the fact a setmark was seen, as well as data record and EOFs and errors :)



Stan Sieler sieler_at_allegro.com
www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler
Received on Fri May 03 2002 - 14:10:42 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:20 BST