On Thursday 03 August 2017 15:59:00 Will Aoki wrote:
> On Mon, Jul 31, 2017 at 04:37:37PM -0400, Chris Hoogendyk wrote:
> > Here is my latest attempt, working with a new, never been loaded,
> > LTO7 tape. I should note that I have a page in my server notebook
> > from July 2014 showing almost this exact sequence of commands when
> > setting up my LTO6 library.
> >
Quite a high percentage of the modern tape drives, will, after a rewind,
if asked for a read, will reread the tape header, see that compression
is enabled, and will very helpfully (not!) re-enable it. I have in the
past, read out the amanda header, the first VISIBLE 32k block on the
tape, rewound the tape, turn the compression off and instantly, before
the drive is moved again, rewrite that 32k amanda header block, which
then locks the compression off until such time as you rewind it,
re-enable it and write something to lock it back on.
> > Bottom line is that tapeinfo tells me compression is off, it's a new
> > tape, then amtapetype tells me compression is on.
>
Tapeinfo IIRC gets that info from the drives firmware without moving the
tape.
amtapetype actually reads the tape, moving it to determine that. Moving
it resets it by reading the tapes hidden header.
So rewind it
dd the amanda header out to a scratch file
rewind it
turn the compression off
dd that scratch file back to the tape
Then you should have agreement between Tapeinfo and amtapetype, saying
the compression is off.
If you are recycling tapes, do the above to each tape you insert until
you have done this little routine with every tape destined to be
inserted into this drive. But do not do it ahead of its scheduled re-use
as that invalidates the backup you might need before the next scheduled
amanda run if something upchucks between doing it, and the run that
re-uses it.
> I wasn't able to get compression turned off on the LTO-7 drive in my
> Quantum SuperLoader 3. I ended up deciding to leave compression on,
> as it didn't seem to do any harm in my testing.
>
> My drive:
>
> Product Type: Tape Drive
> Vendor ID: 'IBM '
> Product ID: 'ULTRIUM-HH7 '
> Revision: 'FA17'
> Attached Changer API: No
> SerialNumber: '10WT------'
> MinBlock: 1
> MaxBlock: 8388608
> SCSI ID: 23
> SCSI LUN: 0
> Ready: yes
> BufferedMode: yes
> Medium Type: 0x78
> Density Code: 0x5c
> BlockSize: 0
> DataCompEnabled: yes
> DataCompCapable: yes
> DataDeCompEnabled: yes
> CompType: 0xff
> DeCompType: 0xff
> BOP: yes
> Block Position: 0
> Partition 0 Remaining Kbytes: -1
> Partition 0 Size in Kbytes: -1
> ActivePartition: 0
> EarlyWarningSize: 0
> NumPartitions: 0
> MaxPartitions: 3
>
> My tapetype:
>
> #Checking for FSF_AFTER_FILEMARK requirement
> #Applying heuristic check for compression.
> #Wrote random (uncompressible) data at 92327868.852459 bytes/sec
> #Wrote fixed (compressible) data at 165647058.823529 bytes/sec
> #Compression: enabled
> #Writing one file to fill the volume.
> #Wrote 6015744049152 bytes at 86102 kb/sec
> #Writing smaller files (60157427712 bytes) to determine filemark.
> define tapetype lto-7 {
> # Couldn't seem to get compression disabled...
> comment "Created by amtapetype; compression enabled"
> length 5874750048 kbytes
> filemark 12 kbytes
> speed 86102 kps
> blocksize 32 kbytes
> part_size 200G
> part_cache_type memory
> part_cache_max_size 48G
> }
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>