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