On Wednesday 08 January 2014 14:13:36 Jon LaBadie did opine:

> On Wed, Jan 08, 2014 at 11:37:44AM -0500, Brian Cuttler wrote:
> ...
> 
> > The LTO is advertised as having block level decision making on
> > compression so that it doesn't expand the data, wonder if that
> > is not quite true.
> 
> My experience is limited to LTO-1, but I found amtapetype gave
> 'exactly' the same number of blocks capacity for compression on
> and off.
> 
> > Also - Isn't there another level of tape header that needs to be
> > cleared? Isn't re-writing the tape with compression off a little
> > bit of a trick? If you don't clear that other level of header, then
> > the compression is determined by the header info and not by the
> > device type selected when you write the tape?
> 
> Personal opinion;  That whole "hidden header" is bogus, perpetuated
> by our friend Gene.  It appears to be the situation if you turn off
> compression and try to use a previously compressed tape with amanda.
> 
> However, remember what amanda always does before writing any tape
> (with the possible exception of amtapetype).  It first reads the
> beginning of the tape for possible (and correct) amanda header.
> Reading a tape automatically sets the compression to whatever
> the tape previously used.  So if the data currently on the tape
> is HW-compressed, the drive switches to HW-compress mode.

Which is why, after turning the flag off you do it after rewinding the 
tape, and you re-write that scratch file cached 32k amanda header block 
back to the drive BEFORE the drive has had a chance to re-read the tapes 
own ID header. The header, first block on the tape, copied into ram in the 
drive as it scans and identifies the tape, it not accessible to anything 
but mtx that I am aware of.  And mtx can't change the tape itself, only the 
ram image, which if you rewrite the amanda header from a fully rewound 
state will then be written to the tape ahead of the amanda header by the 
drive.  I have dumped probably 20+ of those 32k amanda headers, and there 
is not a single bits difference between one extracted from an uncompressed 
tape, to the one from a compressed tape, the only diffs are in the tape 
name itself.  Daily-1, Daily-30 etc.

If its not a hidden header on the tape guys, then where the heck is it 
hidden?  It is not visible to us.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

I hate dying.
                -- Dave Johnson
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

Reply via email to