IBM Support

How Much Data and How Much Free Space is Available on a Tape



This document explains how to calculate and estimate of the amount of data that is on a tape cartridge and how much free space might be available.

Resolving The Problem

This document explains how to calculate and estimate the amount of data that is on a tape cartridge and estimate of how much free space is available, depending on the total capacity of the cartridge. The following methods are only estimates because they cannot take into account Encryption, Data Compression or Optimum Blocking.

Method 1: Run the DSPTAP *LABELS command to *PRINT. To determine how much save/restore data is on a cartridge, add all the file lengths and multiply by (block length less 4096). This gives you how many bytes are written to the tape.

                File       Block   Recg  Record  Block   File      Mvol  Mvol       Date     Expiration
Data File Label Sequence   Format  Tech  Length  Length  Length    Ind   Sequence   Created  Date        

 SAV20070304    0000000001 *U      P     00000   262144  000232033 CONT  0000000001 03/04/07 *PERM      

232033 x (262144 - 4096) = 59,875,651,584 B

Data compression, if used, affects this figure; however, there is no way to calculate the effects.

In addition, if using a tape drive that is capable of optimum blocking and Use Optimum Block *YES is specified, there is no way to calculate how much more data can be written to the tape cartridge. Note: There is a minimum 20 percent margin of error when using this calculation. If the tape has sequences with different block lengths on it, you should group the different entries together. Do the calculations for each group, and add them all together to get the total amount of data on the cartridge. 262144 0000232033

Method 2: Use STRSST and MEDIA SESSION STATISTICS. Issue the STRSST command, select Option 1 - Start a service tool, select Option 1 - Product Activity Log, and then select Option 5 - Display or print removable media session statistics. Enter the Removable Media type (2 for LTO type media) and the specific Volume ID, press Enter and type the date and times of the saves.

Review the data and then tally up the stats for a given volume for a given time frame.  Session stats are collected when a tape is loaded and after a set number of bytes have been processed. When a tape is unloaded one final session stat is logged.  So session stats could have a number of entries of the same size and then a residual for the remainder of the data written.  In addition, the session stat  represent the data written since the tape was loaded written to and unloaded.  It does not account for data written from prior "sessions" or written to the same tape volume by another system. One must understand their tape usage to begin to make sense out of the session stats.

Previously, the session stats were collected and listed for every 2.3 GB or 2.09 GB of written data. Then recently due to the extreme increases in volume capacities, the number of bytes written per stat collection was increased. So now we can have  session stats that represent 2.3 GB or 67 GB and any number less than these two numbers.

Note (estimate only):
Both these processes (DSPTAP or SST) are an estimate of the number of bytes passed to the tape drive. It is not the number of bytes of data on the tape.  If the tape drive is using data compression and/or data encryption the actual number of bytes on tape are different. They are just an estimate eg. tape is 1 TB native, 2 TB with 2:1 compression and I have written 500 GB, so my tape could be 1/4 full. Once you have written your system's data enough times tape and you have done enough tabulations, you should have a better understanding of what your data and your tape can do.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number


Document Information

Modified date:
08 February 2022