Shiera said:
Hello everyone,
I really need your help on the following.
Excerpt from SCSI Stream Commands-2 (SSC-2) Working Draft:
1.) "Filemarks are special recorded logical objects not containing
user data."
2.) "Setmarks are optional special recorded logical objects not
containing user data."
QUESTIONS:
What really are filemarks and setmarks? I assume these are
multiple-byte logical objects. But since these do not contain user
data, then what are the contents of these tape marks? Can these be
modified by the application client?
What's the size of filemarks and setmarks? Can their size be modified
by the application client?
Thank you so much for your help!
- shiera -
Filemarks and setmarks are just flags on tape that are used to mark certain
sections on tape. They allow you to create a logical format on tape. On
harddisks it's easy to record that file XYZ starts on track 200, head 3,
sector 12. Tape is a sequential medium, so it's a lot harder to find
specific locations. To prevent that you have to read the entire content from
the beginning each time you need to find data, you can use filemarks and
setmarks. Typical data lay-outs on a non-partitioned tape could be:
BOT-HHH-F-F-EOD (Tape just labelled)
BOT-HHH-F-DDD-F-III-F-F-EOD (Tape with a single backup set)
BOT-HHH-F-DDD-S-DDD-S-DDD-S-DDD-F-III-F-F-EOD (Multiple savesets in a single
session)
BOT = Begin of tape
H = Header information (readable by the system)
F = Filemark (Searchable, but not readable)
D = Data (readable by system)
S = Setmark (Searchable, but not readable)
I = Index information (readable by system)
EOD = End of Data (blank tape)
The header information is written to tape when you 'label' your tape from
the backup application. The system will write a couple of blocks and then
two filemarks. EOD is automatically recorded, the system doesn't tell the
drive to.
When reading back, the system will first send a "Space to End of Data" to
find the last recorded entity. It will then send a "Space 3 filemarks back".
If the tape only contains a label, the drive will report it's back at BOT.
If there are savesets on the tape, the drive will be at the beginning of the
filemark just prior to the Index data. So a "Space 1 Filemark Forward" will
get the system to the index data.
The system reads the index data, which shows that file XYZ starts at saveset
2, block 15. The system sends a "Rewind", then a "Space 1 Filemark Forward".
The drive is now at the begin of user data. The system now sends a "Space 1
Setmark Forward", finding the location of the second saveset. Then a "Space
15 blocks forward" will get the drive to the start of data blocks belonging
to file XYZ.
Long story, but hopefully it illustrates how filemarks and setmarks are
used. As they are internal markers to the tape drive, their size depends on
the tape technology in use. Some tape streamers know long and short
filemarks, some can be modified in length. Most of the client apps don't
care, they use them as signposts. Which is what they are designed for...
Rob