26. How SF Archive writes to LTO tape
* SF Archive writes to Tape in LTFS Format.
- Tape Initialization
- Beginning-of-Tape (BOT) Marker:
When a new tape is loaded, the drive positions the tape at the BOT marker, a special area at the start of the tape.
- Writing Data and Indexes
- File Data:
Files are written sequentially to tape. Each file is typically written as a “file” in tape terms, which may be a single file or a group of files bundled together in a logical group.
- Filemarks (End-of-File Markers):
After each file or logical group, the software instructs the drive to write a filemark (EOF marker). This tells the drive and software where one file ends and the next begins.
- Indexes:
The software maintains an index of what’s on the tape. This index is stored in the SF Archive database, but also write a copy of the index to the tape itself, in a reserved area so the tape can be read independently.
- End-of-Data (EOD) Marker:
After all files are written, an EOD marker is written to indicate the end of valid data.
- End-of-Tape (EOT) and End-of-Volume (EOV) Markers
- End-of-Tape (EOT):
The tape drive detects when it’s near the physical end of the tape and signals the software. The drive may write an EOT marker, and the software will stop writing and prompt for a new tape if more data needs to be stored.
- End-of-Volume (EOV):
If the tape is part of a multi-tape set, the software marks the end of the current volume and prepares to continue on the next tape.
- Tape Unloading:
The software may rewind the tape and/or eject it, updating its database with the tape’s status and contents.
- Markers and Structure on Tape
Here’s a simplified view of how a tape might be structured:
| BOT | File 1 | EOF | File 2 | EOF | ... | Index | EOF | EOD | EOT |
BOT: Beginning of Tape marker (physical start).
File n: Data written by the software.
EOF: End-of-File marker (filemark).
Index: Self-describing tapes.
EOD: End-of-Data marker.
EOT: End-of-Tape marker (physical end).
Note: The actual physical markers (BOT, EOT) are managed by the tape drive hardware. Filemarks (EOF) and EOD are written by SF Archive commands.
- The Cartridge Memory Chip (CM/MIM)
What is it?
Every LTO cartridge contains a small memory chip (Cartridge Memory, or CM; sometimes called Media Information Memory, MIM).
What does it store?
The chip stores metadata such as:
Tape serial number and barcode
Tape generation and capacity
Usage statistics (number of loads, errors, last written position)
Manufacturer information
How is it used?
When a tape is inserted, the drive reads the chip instantly, allowing the software to quickly identify the tape, check its status, and match it to the SF Archive database—without having to scan the whole tape.
Is the index stored here?
Usually, only a small amount of metadata is stored on the chip. The full file index is too large and is kept in the SF Archive database.