LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2010, 11:27 AM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
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.

Last edited by davidstvz; 05-03-2010 at 11:37 AM.
 
Old 05-03-2010, 12:14 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
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)

Last edited by rweaver; 05-03-2010 at 12:17 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to determine the tape usage for a streamer? alexandrusa Linux - Software 5 10-01-2008 11:45 AM
Left space on tape ? czezz Solaris / OpenSolaris 9 07-17-2008 09:36 AM
No space left on device even though it has free space? enine Linux - General 8 05-30-2007 04:22 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 01:14 PM
How much free space left on a tape? bfloeagle Linux - General 0 08-07-2001 07:55 AM


All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration