Amanda-Users

Re: Avg Dump Rate and Compression

2004-03-24 08:43:47
Subject: Re: Avg Dump Rate and Compression
From: Jonathan Dill <jfdill AT jfdill DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 24 Mar 2004 08:40:05 -0500
There are a few more things to try. First, there may be an mt command to set the "default" compression for the drive--that will at least help make sure if you use some new tapes, they will get started with the correct compression. The tricky part is that some drives, such as 8mm, use the "density" to set the compression and ignore the "compression" command. You can usually get some ideas by looking at the output of "mt status". Under Linux, the commands you want would be something like "mt defcompress off" and "mt defdensity" then the drive will (hopefully) use those settings by default when you load a new tape, and for some drives, may actually override what's on the tape that you load. I have sometimes put these commands into one of the system startup scripts, such as /etc/rc.d/rc.local on Linux.

Second, some drives have dip switches that you can set to hard-disable compression. For example, I had a Sony DDS4 autoloader that had dip switches to do that. At least, the dip switches make it non-ambiguous what is going on.

Third, some drives may have (usually Windows-based) firmware utilities that will let you set the settings of the drive, sort of like software dip switches. You would just need some Windows computer with a SCSI card in it, it wouldn't even have to be a good SCSI card just to send the commands to the drive as long as you have the right type of cable. The bad part is you have to disconnect the drive, possibly move it, and hook it up to the WIndows box. Worst case, maybe you could get some sort of SCSI adapter for a laptop with WIndows, such as PCMCIA, USB, Firewire, or even Paralllel to SCSI adapter.

Fourth, some tape drives like AIT or AME (Mammoth) supposedly try to set the compression "dynamically" based on the data and don't care whatever you do to try to stop it--you would have to go to the manufacturer and look up the specs for the drive to find out if it does that.

Lastly, when I have run into this problem, I usually have done this, but wonder if it could have caused problems:

# load the tape
mt compress off
amrmtape config label
amlabel config label

If you're going to be doing this to a bunch of tapes in an autoloader, it probably would be easier to script the "dd" command that Gene described, because you just dump the header to a temp file and the script doesn't have to try to parse what's in the temp file to figure out what the tape should be called.

Good luck!

Gene Heskett wrote:

The only way I know of to fix such a tape is:
rewind it
read out the label to a scratch file using dd
rewind it again
turn the compression off with "mt -f device whatever turns it off"
dd that scratch file back to the tape using the non-rewinding device
dd at least enough data from /dev/zero to force the drive to flush its buffers. This will force the drive to turn the header compression flag off and that tape will not be compressed again unless you turn compression back on.
--jonathan

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