Amanda-Users

Re: controlling hardware compression?

2003-05-24 00:19:33
Subject: Re: controlling hardware compression?
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: Mathias Körber <mathias AT koerber DOT org>, amanda-users AT amanda DOT org
Date: Sat, 24 May 2003 00:17:30 -0400
On Friday 23 May 2003 23:47, Mathias Körber wrote:
>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.

Thats exactly what will happen in almost all instances from my 
experience.

>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.

Change that to a -c true/false, and it would be a winner.  The 
problem with that is that the various drives take various commands 
to effect that, so it might be required to have a preset file, 
built by the user, that contains the required command syntax to do 
that to *his* drive.  It would also require a bit of must read 
documentation, and with some users, thats always going to be a 
problem due to a general lack of RTFM.  In particular the noobie is 
going to be asking a lot of why can't amlabel just work, when in 
fact it cannot find the syntax file the user hasn't generated.

But in general, it addresses a problem that attacks a lot of new, 
and sometimes even seasoned users.  It may be possible to write the 
code such that it has to verify the files existence prior to 
enabling the -c option.  And if the option is given, but no file 
exists, then spit out a helper warning about the missing file and 
exit without further action.

J.R.J.?  Can you comment?  Does this sound doable?

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

What does this portion of its report look like?

-- 
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz  512M
99.26% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.