Amanda-Users

Re: New tapetype

2003-02-04 12:38:38
Subject: Re: New tapetype
From: barryc <barryc AT rjlsystems DOT com>
To: amanda-users AT amanda DOT org
Date: Tue, 4 Feb 2003 11:51:46 -0500 (EST)
This may sound like a dumb question, but wouldn't it be easier to just use a 
bulk tape eraser (read: nicely powerful electromagnet) to completely wipe the 
tape and then relable it?


>To turn it off, one must use a combination of mt to run the drive, 
>and dd to write to it. The basic idea is to rewind the tape, use mt 
>to turn the compression off (see the docs on your version of mt, 
>they've recently been playing with it) and then write enough data 
>to the drive that its forced to flush its buffers.  At this point 
>it will re-write that hidden header with the compression flags off 
>and that tape will then be fixed to show a no compression 
>preference setting when it is subsequently re-inserted nto the 
>drive.
>
>Something like this:
>mt -f /dev/nst0 rewind
>## save the tapes label
>dd if=/dev/st0 of=./scratch bs=32k count=1
>mt -d /dev/nst0 defcompression -1 (or off, depends on your mt)
>## most drives have at least a 4 meg (131072 blocks of 32768 bytes) 
>## buffer, so overrun it
>dd if=/dev/zero of=/dev/st0 bs=32k count=131073
>## restore the label
>dd if=./scratch of=/dev/st0 bs=32k count=1
>## then to show the restored label and make us feel better
>dd if=/dev/st0
>##which will spit out the restored label onscreen.
>
>Now, if that drive has a compression status led, it should be off.  
>My Seagate 4 slotter has such an led in the front of the drawer.


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