Go to the previous, next section.

Tape Positions and Tape Marks

(This message will disappear, once this node revised.)

Just as archives can store more than one file from the file system, tapes can store more than one archive file. To keep track of where archive files (or any other type of file stored on tape) begin and end, tape archive devices write magnetic tape marks on the archive media. Tape drives write one tape mark between files, two at the end of all the file entries.

If you think of data as a series of "0000"'s, and tape marks as "x"'s, a tape might look like the following:

0000x000000x00000x00x00000xx-------------------------

Tape devices read and write tapes using a read/write tape head---a physical part of the device which can only access one point on the tape at a time. When you use tar to read or write archive data from a tape device, the device will begin reading or writing from wherever on the tape the tape head happens to be, regardless of which archive or what part of the archive the tape head is on. Before writing an archive, you should make sure that no data on the tape will be overwritten (unless it is no longer needed). Before reading an archive, you should make sure the tape head is at the beginning of the archive you want to read. (The restore script will find the archive automatically.

FIXME: xref Scripted
Restoration
).
FIXME: xref mt
, for an explanation of the tape moving utility.

If you want to add new archive file entries to a tape, you should advance the tape to the end of the existing file entries, backspace over the last tape mark, and write the new archive file. If you were to add two archives to the example above, the tape might look like the following:

0000x000000x00000x00x00000x000x0000xx----------------

Go to the previous, next section.