On Sunday 16 June 2002 05:49, Niall O Broin wrote: >On Sat, Jun 15, 2002 at 08:56:56PM -0400, Gene Heskett wrote: >> >> I think you missed the sequence there, I used the rewinding >> >> device descriptor "st0" when I read the label out to a file, >> >> so when the >> > >> >Ah, there's the rub - that may be what you MEANT but what you >> > posted was >> > >> >-------------------------------------------- >> >#!/bin/bash >> >mt -f /dev/nst0 rewind >> ># but don't rewind it here as you save the amanda label >> >dd if=/dev/nst0 of=label-this-tape bs=512 count=1 >> > >> > >> >which is just a little different :-) >> >> A bunch in fact, like being pregnant. But that script does >> work, its the one I used. I had to ssh into my office machine >> 30 miles up the road to get it. >> >> Now I'll have to re-check my handiwork, I hate that :-) > >And it begs the question - does this oft stated thing actually > happen i.e. does a tape actually get "locked" into compressed > mode ? Can anyone provide any documentation on this, one way or > the other ?
I tried several times to get the led to stay off just by turning the compression off and re-writing the label block with no success, and have come to the conclusion that the only way to make it "stick" is to make it flush the drives fifo buffer to the tape before doing the rewind and rewrite of the label. And in testing here, using /dev/urandom didn't always do it, but /dev/zero worked everytime. I presume, based on that theory, that one could rewind, turn the compression off, rewrite the label using /dev/nst0, and follow that with 2 to 4 megs of /dev/zero to force the flush and get the same results. But I haven't tested that, so I can't lay my hamd on the good book and claim it works. Its going to be a couple of minutes process per tape in any event due to the apparent requirement of making it flush the buffer to the tape, thereby preserving the setting on the tape itself. Whats sad about all this is the attitude the drive makers have about this sort of data, its 100% proprietary information AFATAC. It Sucks (to plagerise a Joanne Dow expression) dead toads thru soda straws, a ladies present description AFAIAC. -- Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.0% setiathome rank, not too shabby for a WV hillbilly
