Operating System - HP-UX
1837979 Members
2735 Online
110124 Solutions
New Discussion

Re: How to know the amount of tape usage

 
Atul Goel
Frequent Advisor

How to know the amount of tape usage

I have made a recovery tape using Ignite's make_tape_recovery command. I wanna know the amount of tape usage. Is there any command which can tell me how much space of tape is occupied and ho much is empty.
Also i have another tape with some data backed up on it. And i wana know same the usage of tape for that too.
Please help
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: How to know the amount of tape usage

You can read the tape back in a listing format and then total up the sizes of the individual files to get a fairly close approximation but the general answer to your question is "not really". It's at least possible if you disable compression but with compression enabled the capacity of the tape varies with the compressability of the data. For example, you might find that two tapes have an identical amount of native capacity left but one could store 5X as much as the other simply because the data compressed 5X more.
If it ain't broke, I can fix that.
Atul Goel
Frequent Advisor

Re: How to know the amount of tape usage

I am not able to read it in the listing format.
I am very new to HPUX. Please tell me how to convert this character file in to readable format
Torsten.
Acclaimed Contributor

Re: How to know the amount of tape usage

Hi,

how to read an ignite tape?

# mt -f /dev/rmt/?mn rew
# mt -f /dev/rmt/?mn fsf 1
# tar -tvf /dev/rmt/?mn

?mn is your current device file like 0mn, 1mn ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven E. Protter
Exalted Contributor

Re: How to know the amount of tape usage

Shalom,

You can read the tape data.

See Patrick Walleck's unrewarded response below:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=142073

There is no reason to know how much tape is used. You can't use the tape for anything else anyway. If you try, you'll corrupt the ignite image.

If you are concerned about running out of space on a future tape, take the total amound of space used in the filesystems being backed up and use a 50% compression factor to estimate use.

A data backup tape use information depends totally on the application used to create the tape.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: How to know the amount of tape usage

Hi:

An Ignite tape is a 'pax' archive with a LIF file at the front. To sum the file sizes, *(in characters) do:

# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 1
# tar -tvf /dev/rmt/0mn | awk '{SZ+=$3};END{print SZ}'

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: How to know the amount of tape usage

When you are asking about tape usage, you are probably asking 2 questions:

1. how many feet or meters are used or left unwritten on the tape?

and

2. can I append more data at the end of the tape to save some money?

The answer to the first question is almost impossible to answer because there is no way to determine how much the data was compressed. Even if you get a table of contents and file sizes from the pax backup portion, you would have to analyze every file to see the compression amount (ie, 2:1 or 5:1 or even 1:1).

But the bigger issue is this: are you willing to accidentally destroy the Ignite tape by not properly positioning the tape before you add more onto the end of the tape. If this is a test system, then perhaps you can play around and make appending work for you. If it is in production, loss of the Ignite tape will never be known until it is needed. And usually, the need for a working tape is due to a catastrophic failure. You don't ever want to find out that you've destroyed your recovery tape trying to save some money on media.


Bill Hassell, sysadmin
A. Clay Stephenson
Acclaimed Contributor

Re: How to know the amount of tape usage

You seemed to have missed the basic tenet of my response in that the answer is all but meaningless. A good way to look at this is the way HP's high-end backup system, Data Protector, handles this. You can assign a "size" to a medium when the medium is formatted but the "size" is meaningless. DP always writes to the end of media regardless of the value of the "size". Backups of the same files (even if the sizes of the individual files do not change) can use different amounts of tapes because while the size of the files might not have changed the data within those files were changed and thus the compressability changed.
If it ain't broke, I can fix that.