tar: Tape Positioning
1
1 9.5.1 Tape Positions and Tape Marks
1 -----------------------------------
1
1 _(This message will disappear, once this node revised.)_
1
1 Just as archives can store more than one file from the file system,
1 tapes can store more than one archive file. To keep track of where
1 archive files (or any other type of file stored on tape) begin and end,
1 tape archive devices write magnetic "tape marks" on the archive media.
1 Tape drives write one tape mark between files, two at the end of all the
1 file entries.
1
1 If you think of data as a series of records "rrrr"'s, and tape marks
1 as "*"'s, a tape might look like the following:
1
1 rrrr*rrrrrr*rrrrr*rr*rrrrr**-------------------------
1
1 Tape devices read and write tapes using a read/write "tape head"--a
1 physical part of the device which can only access one point on the tape
1 at a time. When you use 'tar' to read or write archive data from a tape
1 device, the device will begin reading or writing from wherever on the
1 tape the tape head happens to be, regardless of which archive or what
1 part of the archive the tape head is on. Before writing an archive, you
1 should make sure that no data on the tape will be overwritten (unless it
1 is no longer needed). Before reading an archive, you should make sure
1 the tape head is at the beginning of the archive you want to read. You
1 can do it manually via 'mt' utility (⇒mt). The 'restore' script
1 does that automatically (⇒Scripted Restoration).
1
1 If you want to add new archive file entries to a tape, you should
1 advance the tape to the end of the existing file entries, backspace over
1 the last tape mark, and write the new archive file. If you were to add
1 two archives to the example above, the tape might look like the
1 following:
1
1 rrrr*rrrrrr*rrrrr*rr*rrrrr*rrr*rrrr**----------------
1