Command to get tape capacity status?

Cameron Simpson cs at zip.com.au
Sat Apr 12 23:01:16 UTC 2008


On 12Apr2008 08:43, Scott R. Ehrlich <scott at MIT.EDU> wrote:
> I have an Overland tape library connected, via SCSI card, to an out-of-box, 
> full install of CentOS 5 install on an old PC.
> I have a script that uses tar to archive data to tape and mtx to change 
> tapes. What I don't know, if possible, is to obtain the status of how much 
> tape is left in the drive.   If I get a write failure, I'd like to know if 
> the tape is bad or has run out of space.

These should get different error statuses - I/O error versus end of
medium ("no space left on device").

Regarding how much is left, I'm not sure that's easily determinable. I
do recall seeing a command to obtain the tape data density (if reported
by the drive), but you would still need to track how much you've written
to figure out the rest. And guess at the compression rate, for
compressing tape drives.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

But pessimism IS realism!       - D.L.Bahr




More information about the redhat-list mailing list