Tape Libraries and Drives
cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine how much space is left on a SDLT tape?

Brian_254
Occasional Visitor

How to determine how much space is left on a SDLT tape?

Is there a way to determine how much space is left on a SDLT tape?

Can query current position, and it is returned as a a block number. Is there a fixed block size that can be used to determine space used/remaining?
1 REPLY
Stuart Whitby
Trusted Contributor

Re: How to determine how much space is left on a SDLT tape?

There's not really a reliable way to do this unless you disable all compression, and I guess the reason you're asking this is because you want to put as much data on tape as possible.

By removing all compression, you can simply use dd if= of=/dev/null bs=64k and figure out how much data is on the tape in 64k blocks. The end output of dd will tell you how many blocks have been read - I *think* this will work correctly even if there's a different blocksize on tape, but I'm really not sure. If it does, you can then figure out how much physical space is left on tape since you know how much is physically written. What you can't guarantee is how much compressed data you'll be able to write.
A sysadmin should never cross his fingers in the hope commands will work. Makes for a lot of mistakes while typing.