LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to determine the space left on a tape? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-determine-the-space-left-on-a-tape-805669/)

davidstvz 05-03-2010 11:27 AM

How to determine the space left on a tape?
 
You would think it would be easy to do this (and essential to maximizing and predicting the usage of tapes), but apparently this isn't so.

The program MT(1) actually had some commands that give the block positition (if supported by the drive) from which the remaining space could be deduced (even if you couldn't predict exactly how much space the next archive would take up).

However I'm using MT(1L) which no longer has such commands. Any ideas?

EDIT

Oh... I just realized that in MT(1L) the L probably stands for "light". Just installed MT(1) which, assuming my drive isn't too stupid to report the current block position, will tell me what I need to know.

rweaver 05-03-2010 12:14 PM

It should be fairly trivial to write a simple bash script or command line that will output the remaining space left on the tape.

Code:

set blocksize
set totalB
set currentB
set size=(totalB-currentB)*blocksize
display size

(in psuedocode--- could probably consolidate that to a single although probably to complex to type regularly command line using no variables)


All times are GMT -5. The time now is 09:55 PM.