On Sunday 21 July 2002 14:47, Mark Cooke wrote: >On Sun, 2002-07-21 at 19:22, Gene Heskett wrote: > >[..] > >> In our experience, when the tape is recognized by the drive >> after being inserted, the drives compression setting is restored >> to whatever was in effect when the tape was last labeled. > >So as long as as hardware compression is turned off (with the > commanded I used) *before* I run amlabel, then everytime I insert > that tape it will not use hardware compression, as it was labeled > up with hardware compression turned off?
Thats correct AFAIK. >Just to make sure that hardware compression is turned off I've > created a small script that disables it and inserted that using > cron to run, just after amcheck, but before amdump. That won't do much good because amdump will re-read the label, which will reset it to whatever it was when the NEW tape was labeled the first time. Thats why I had to do the huge writes with dd to make the drive flush the buffers and actually update the tape itself. Am I making sense? Like this, assuming nst0 is the non-rewinding device and st0 is the rewinding one. dd if=/dev/st0 of=/tmp/header # this will leave it rewound mt -f /dev/nst0 compression off mt -f /dev/nst0 datcompression off mt -f /dev/nst0 defcompression off dd if=/tmp/header of=/dev/nst0 # too small a write, no data # actually moves to the tape but a tell will say block 1 dd if=/dev/zero of=/dev/nst0 count=131072 # which should force the buffer to be flushed to tape mt -f /dev/nst0 tell #verify position mt -f /dev/nst0 rewind mt -f /dev/nst0 tell # should be at block 0 and compression led is # off after amcheck has looked at it. diddle to suit, particularly the count variable above, some drives may have an even bigger buffer. -- Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.07% setiathome rank, not too shabby for a WV hillbilly
