On Dec 12, 2014, at 11:00 AM, Chuck Guzis wrote;
Subject: SCSI tape question
Now, when I come to a filenark, I'm expecting that the filemark bit (bit
7) will be set in the sense key. It doesn't happen, the result just
comes back as 0 bytes read and a normal (NO_SENSE) sense result. The
additional sense code and sense qualifier bytes are also 0.
I wrote the SCSI tape drivers for the Unix based version of the NCAR Mass Storage System
(MSS) Storage Manager servers, we moved a few petabytes of data through them. It made use
of the SCSI generic interfaces of Irix, Solaris and Linux, but we couldn't trust the
default OS tape drive driver behaviors would do the right thing for an archive.
You should be able to detect file mark indications in either the variable length or fixed
block read modes. When the tape (or drive controller buffer position for those that
perform buffering) is positioned at the file mark, you will get a check condition response
to the issuance of the read command, then you (or the SCSI generic driver) issue the read
sense command (immediately after the read, no other intervening commands!) and the file
mark bit will be set in the sense buffer. For the generic SCSI devices, you can typically
tell the driver to perform an auto sense for check condition responses. Just make sure you
have properly told the driver where to put the sense data. I suppose a drive could have a
manufacturer specific mode that could hide file marks, but I've never seen one. We
did make use of manufacturer specific procedures to place the read head beyond the
detected EOT mark so we could recover tapes that had been accidentally overwritten in the
middle of recorded data.