Operating System - HP-UX
1827283 Members
3756 Online
109717 Solutions
New Discussion

cpio- How much tape has been used?

 
Chris Jones_4
Occasional Contributor

cpio- How much tape has been used?

Hi,
I've used cpio to backup to tape using a device file which enables compression. At the end it tells me I've backed up 100 million blocks of data.

Is that compressed or uncompressed data?

Is it 50Gb or 500Gb? 50Gb sounds about right but then what compression have I got?

So the question is really - how can I make sure I'm getting compression and also how many bytes are actually being written to tape? (using cpio).

Any ideas welcome.
Doh!
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: cpio- How much tape has been used?

Hi Chris:

Cpio reports in 512 byte blocks. That is the uncompressed number of bytes since the host would not have a clue as to how many bytes is actually written as compressed data to tape.

Clay
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: cpio- How much tape has been used?

Hi Chris,

Clay is right. Cpio reports the no of blocks it has backed up. each block size is 512 bytes. So the total amount (MB) of data backed up will be No of blocks reported by cpio divided by 2048.

Do remember that if the size of the file is, say 800 bytes, cpio reports it as two blocks.
0-512 bytes ---> 1 block
513 --1024 bytes --> 2 block
and so on.

hope this helps.

thanks

Frank Slootweg
Honored Contributor

Re: cpio- How much tape has been used?

What type and subtype of tape drive (and which type of tape) are you using?

If cpio reports more than the *native* (uncompressed) capacity of the tape, then, apparently, (hardware) data compression is working. If DLT7000, then all is well, because its native capacity is 35GB.

Hardware data compression *should* be working if lssf(1M) of the device file says "best density" and the tape drive is not configured incorrectly (i.e. not set to no compression). See the hardware documentation of the tape drive in question for details.
Rodney Hills
Honored Contributor

Re: cpio- How much tape has been used?

Check out the utility "ddsinfo" found on the HPUX Software and Porting Archive http://hpux.connect.org.uk/

It can be used to display actual tape usage for newer DDS drives.

-- RH
There be dragons...