I've written a small script that backs up data to a tape, rewinds it, then reads back the data that was stored as a test.

The problem I've run into is that 'mt rewind' is asynchronous, and subsequent tape operations will fail until the rewind operation has finished.

Is there a way to find out when the tape has finished rewinding, or at least to rewind synchronously? The drive is an ATA Seagate STT2401A.

Can you use "mt status" along with the appropriate *.ctl device?

From the man page...

Print status information about the tape unit. For SCSI mag- netic tape devices, the current operating modes of density, blocksize, and whether compression is enabled is reported. The current state of the driver (what it thinks that it is doing with the device) is reported. If the driver knows the relative position from BOT (in terms of filemarks and records), it prints that. Note that this information is not definitive (only BOT, End of Recorded Media, and hardware or SCSI logical block position (if the drive supports such) are considered definitive tape positions).


Or maybe rdspos?

Read SCSI logical block position. Some drives do not support this. The count argument is ignored.


-philip _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to