Determine Free Space on Tape

Determine Free Space on Tape

Post by FriscoKi » Tue, 22 Jul 2003 12:33:48



Hi -

I've only recently started using tar to back up my linux system to a scsi
tape drive (Travan 20GB), where I used to back up directly to a spare hard
disk drive.  I have no problems running the backup, but I am curious to know
if there is an easy way to see how much free space is left on the tape?  I'm
only using tar and have no gui tools or other backup programs.  I would
simply like to know how much room on the tape the backup is taking.  I
suppose I could count up the size of all the directories I'm backup up, but
that doesn't factor tape compression.  Does one of the "mt" options allow
you to see how much space remains?

Thanks.

(reply to group)

 
 
 

Determine Free Space on Tape

Post by William Cherr » Fri, 25 Jul 2003 02:18:32


Hi,  

The "mt tell" option can give you some idea, if your drive supports this
(many scsi drives do).  After you write your backup file, you can
use "mt tell" to see what block your on.  If you multiply by block size,
that will be roughly how much tape you used up.

If you want to find out how much stuff is already on the tape,
first do "mt eod" to move to the "end of data."

Don't forget to use the "no-rewind" drive specification,
e.g.

        mt -f /dev/nst0 eod
        mt -f /dev/nst0 tell

Hope that helps.

--William Cherry

Quote:> Hi -

> I've only recently started using tar to back up my linux system to a scsi
> tape drive (Travan 20GB), where I used to back up directly to a spare hard
> disk drive.  I have no problems running the backup, but I am curious to know
> if there is an easy way to see how much free space is left on the tape?  I'm
> only using tar and have no gui tools or other backup programs.  I would
> simply like to know how much room on the tape the backup is taking.  I
> suppose I could count up the size of all the directories I'm backup up, but
> that doesn't factor tape compression.  Does one of the "mt" options allow
> you to see how much space remains?

> Thanks.

> (reply to group)


 
 
 

Determine Free Space on Tape

Post by FriscoKi » Fri, 25 Jul 2003 11:00:19



[-----]

Quote:

> mt -f /dev/nst0 eod
> mt -f /dev/nst0 tell

> Hope that helps.

> --William Cherry

Excellent - thanks a bunch!