Amanda-Users

Re: RE Compression usage

2006-07-05 09:18:33
Subject: Re: RE Compression usage
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 5 Jul 2006 09:10:34 -0400
On Wed, Jul 05, 2006 at 02:42:14AM -0700, Joe Donner (sent by Nabble.com) wrote:
> 
> Thanks to everyone for your replies.
> 
> Ok, so what I really wanted to do was to use software compression, and not
> hardware compression.
> 
> Cyrille's suggestion sounds like what I need, but again I'm not sure whether
> using this command will mean that compression is turned off "permanently". 
> I'll look into the stinit command in the meantime...
> 
> Now I'm wondering about the tapes I've already used while hardware
> compression was still on.  Obviously the tape drive will need to feed those
> tapes through its decompression mechanism to read them again.  If I use the
> command as suggested by Cyrille, will that mean that the used tapes become
> unreadable, or that you have to manually turn compression on and off (I've
> read the the compression command overrides the defcompression one for the
> currently loaded tape)?
> 
> Thanks.
> 
> Joe
> 
> 
> Cyrille Bollu wrote:
> > 
> > owner-amanda-users AT amanda DOT org a ?crit sur 04/07/2006 13:17:46 :
> > 
> >> 
> >> Dear all,
> >> 
> >> I just want to clarify something about compression:
> >> 
> >> My understanding is that you can use either software or hardware
> >> compression, or can switch between the two if needed.
> >> 
> >> What is generally, in your experience, the best of the two to use?
> >> 
> >> To switch off hardware compression, I believe I should use:
> >> mt -f /dev/nst0 compression 0 
> >> 
> >> Does this command switch it off permanently until you use the 
> > following?:
> >> mt -f /dev/nst0 compression 1
> >> 
> >> or will hardware compression switch back on, say, after a reboot?
> > 
> > AFAIK, there's another option.
> > 
> > from "mt" man pages:
> > 
> >   defcompression
> >               (SCSI tapes) Set the default compression  state.  The  value 
> >  -1
> >               disables  the  default compression. The compression state 
> > set by
> >               compression overrides the default until a new tape is 
> > inserted.
> >               Allowed only for the superuser.
> > 
> > so one should use:
> > 
> > mt -f /dev/nst0 defcompression 0 
> > 


Some posters have noted that in their environments when the tape drive
reads data that was HW compressed, it resets itself to HW compression.
This greatly impacts your situation if your drive does the same thing.

The first thing most (all?) amanda commands in preparation for writing
is open the tape, read the tape label to confirm it is an amanda tape
(and the expected one), then close the tape before reopening it again
for writing.  Thus, unless you can interpose a "turn off HW compression"
between the close and reopen, the drive will be in HW compression mode
again.  The only way(s) to force the HW compression off at each opening
is with stinit or perhaps Cyrill's defcompression.

Gene Heskett has posted a number of times the steps he uses to ensure
tapes previously used with HW compression won't trick the drive.  It
basically is rewind, close the drive, force HW compression off, use
dd to write a lot of data to the beginning of the tape (20-100MB IIRC).

If needed you can check the list archives at yahoo or marc for his posts.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>