[comp.periphs] What does mt bsf do?

name@portiaStanford.EDU (tony cooper) (05/30/90)

The man page says that mt bsf backspaces one file. Or does it backspace one
filemark (so that in order to backspace one file you have to do mt bsf 2
followed by mt fsf 1). 

How do tape drives that cannot backspace manage to write two filemarks at
the end of the tape when using the norewind device? Drives that can
backspace do it by writing two filemarks at the end of each file and
positioning between the two so that if the tape is rewound there will
be two or if another file is written the second will be written over. I
don't see how drives that cannot backspace can do it. The drive can only
write one after a file is closed. When does it get to write the second?
When the drive is taken off line or is rewound? But what say the tape is
removed without doing either of these?

Is the ANSI standard for 1/2 inch tapes available on line somewhere?

Thanks,
Tony Cooper
tony@popserver.stanford.edu

terryk@encore.com (Terence Kelleher) (05/30/90)

In article <1990May30.052730.20434@portia.Stanford.EDU>, name@portiaStanford (tony cooper) writes:
>The man page says that mt bsf backspaces one file. Or does it backspace one
>filemark (so that in order to backspace one file you have to do mt bsf 2
>followed by mt fsf 1). 

mt bsf 1 spaces back one file mark.  This means you backspace to the
end of the previous file and are set to append to it. Your assumption
on how to backspace to the beginning  of the previous file is correct.

>
>How do tape drives that cannot backspace manage to write two filemarks at
>the end of the tape when using the norewind device? Drives that can
>backspace do it by writing two filemarks at the end of each file and
>positioning between the two so that if the tape is rewound there will
>be two or if another file is written the second will be written over. I
>don't see how drives that cannot backspace can do it. The drive can only
>write one after a file is closed. When does it get to write the second?
>When the drive is taken off line or is rewound? But what say the tape is
>removed without doing either of these?
>

If the device is set to rewind on close, it will write 2 file-marks on
the close and then rewind.  

If set to no-rewind on close, it will write one filemark on close and
wait.  If the next command is not a write command, the second file
mark is written prior to the operation.  

The actual sequence may vary with different kernels and different
tape drives.  Seems like no 2 are really alike.

>Is the ANSI standard for 1/2 inch tapes available on line somewhere?
>
>Thanks,
>Tony Cooper
>tony@popserver.stanford.edu
-- 
Terence Kelleher
Encore Computer Corporation
terryk@encore.com