Operating System - HP-UX
1834599 Members
3966 Online
110069 Solutions
New Discussion

Re: DDS available capacity

 
SOLVED
Go to solution
Jose M. del Rio
Frequent Advisor

DDS available capacity

Hi,
I'm a beginner in the tape world so this can be an obvious question. For a DDS tape in HP-UX, is it possible to know the available (uncompressed) capacity (I mean, after writing some files to the tape)?
Or, to put it in other words, how can I know the compression ratio achieved writing a file?
Thank you.
11 REPLIES 11
Alexander M. Ermes
Honored Contributor

Re: DDS available capacity

Hi there.
This factor depends on the utility to send data to a tape.
DDS uncompressed takes 2 GB
DDS2 uncompressed takes 4 GB
DDS3 uncompressed takes 8 GB.
If you use tar, you can check the filesizes
with the command tar tvf file/devicename
to check the files in oyur tar archive.
If you have a zip file, use gzip -test -list -verbose.
Another chane for files named file.Z is
zcat file.Z | wc -c.
Hope, this helps.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Paula J Frazer-Campbell
Honored Contributor

Re: DDS available capacity

Hi
DDS comes in serveal sizes:-

DDS2 = 2/4 (2gig and 4 compressed (Although this depends upon data type)

DDS3 = 12/24

DDS4 = 20/40

I think DDS 1 was 1 gig.

Paula
If you can spell SysAdmin then you is one - anon
Thierry Poels_1
Honored Contributor

Re: DDS available capacity

hmmm Alexander and Paula,
I believe Jos? wants to know how much space is really used after a file/backup is written to tape. So for instance a file of 1GB will be ????MB on tape with autocompression on.
As far as I know there is no utility that will show this.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Carlos Fernandez Riera
Honored Contributor
Solution

Re: DDS available capacity


1- Use stm , select tape and run info.

2- search ddsinfo on http://hpux.cs.utah.edu

3. compile the attached source.
unsupported
Thierry Poels_1
Honored Contributor

Re: DDS available capacity

okay, there is a way to show this
megapoints for Carlos (he even customized it for your language ;)
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Jose M. del Rio
Frequent Advisor

Re: DDS available capacity

Sorry, I pressed NEW MESSAGE instead of REPLY.
----------
Thanks to everybody.
After some research, I've found the following information sources:
- STM gives information about available capacity ant compression ratio
- ioctl(SIOC_CAPACITY): the lba field of the struct capacity is an estimate of the available capacity
- ddsinfo reports available capacity and compression ratio.
The problem is STM, SIOC_CAPACITY and ddsinfo give different responses for available capacity. I know they're all estimates but why so different?
And talking about compression, I supose the "Kbytes to Tape" report of the ddsinfo tool computes the real bytes written to tape, but it is rather different than the decrease of available capacity reported by STM, SIOC_CAPACITY and ddsinfo. Why?
Any suggestion?
Thanks in advance.
Regards.
Bill Hassell
Honored Contributor

Re: DDS available capacity

When you talk about compressed capacity, you are in the world of marketing hype and guesswork. The amount of compression depends on what is doing the compression. The Unix compress utility, the GNU compress capability and the tape drive electronics WILL produce different results for the same data.

Thus, the compressability of data won't be known until after it has been stored. The marketing specs are consistently bad: they state 2:1 everywhere as a 'standard' compression. So your data may be 1:1 or 10:1 or even 100:1 so the amount of space taken up by the data depends on the compressability and the amount of data that can be appended is impossible to determine. You could get a close guess by compressing all the files and adding up the results--if you want to go through that exercise.

You are guarenteed the native capacity (the lowest number) minus the space occupied by scratches and bad oxide. Everything else is a bonus.


Bill Hassell, sysadmin
Carlos Fernandez Riera
Honored Contributor

Re: DDS available capacity

Hum.. Nothing about my program....

No problem.

1- Be sure you are not using rewind device ( /dev/rmt/0m) with ddsinfo.

2- ddsinfo can clear counters for compression.

3- You can check which one is correct: first clear statistics , and the write some files of 1Mb ussing no rewind no compress device (see man lssf and mksf ). So each Mb on disk is one Mb on tape.

4- Check it with stm, ddsinfo, and my program ( no viruses, sure).


Regards.
unsupported
Jose M. del Rio
Frequent Advisor

Re: DDS available capacity

I'm sorry, Carlos, to be so ungrateful. In fact, I used both your program and ddsinfo. I just said "ddsinfo" for the sake of simplicity, because both your program and ddsinfo gather their information from the tape driver's logs (although your program offers more statistics).
After some writing tests, I concluded the capacity returned by SIOC_CAPACITY and cstm are quite similar, although about 23% higher than that reported by the tape driver logs.
I contacted Darren Lavender (the author of ddsinfo) and told me the information returned by SIOC_CAPACITY is wrong because of a bug, solved by PHKL_23790 (JAGad03741).
So the more reliable information is the one obtained from the tape driver's logs (via ddsinfo or your program).
Thans again for your answer. It was very helpful.
Carlos Fernandez Riera
Honored Contributor

Re: DDS available capacity

Two more comments:

Available space returned by driver is estimated (driver can invalitade some blocks never used that may be unwritable), and it is measured in KB w/o compresion.

I'm very glad to help you, but remember to assing point to every body that helped you.

Thanks.



unsupported