Amanda-Users

Re: controlling hardware compression?

2003-05-23 23:49:42
Subject: Re: controlling hardware compression?
From: Mathias Körber <mathias AT koerber DOT org>
To: amanda-users AT amanda DOT org
Date: Sat, 24 May 2003 11:47:44 +0800
Paul Bijnens <paul.bijnens@x...> wrote:
IMPORTANT!
You also have to know that, no matter what you had executed as
setting for the compression of your drive, if you READ a tape, the
drive will set itself to what the mode of the tape was. If you insert
a tape written with hardware compression, disable the drive hw compr
by "mt compression off" (verify with "mt status"), then read the tape,
it's back in hardware compression! (verify again with "mt status").
This implies that if you want to overwrite a tape with the other mode,
you may NOT read anything on the tape after setting the mode.

This is the part that worries me. Amanda does perform a tape-read
at the beginning of amdump etc.
While that usually is no problem with amdump (as only labeled tapes
should be used anyway and hopefully they are of the correct type
assuming that tapes have been labeled withthe correct compression
setup), amlabel itself also performs a read and may switch back to
uncompressed if one tries re-labeling a previously uncompressed
tape to compressed or vice-versa.
I would think a -c option to amlabel which makes it set the compression
just before writing the label would be useful. If could name a program
(shell script) which does the actual setting (such as mt or stinit).
Other tools in the amanda suits might benefit from this too.


amtapetype from 2.4.4 does a write without a read (and will detect
hw compression if still on :-) ).