[rescue] mt erase

Doug McLaren dougmc at frenzied.us
Thu May 10 16:59:37 CDT 2007

On Thu, May 10, 2007 at 01:31:15PM -0400, Lord Doomicus wrote:

| I've erased tapes using  dd if=/dev/random of=/dev/mt0 bs=<block size  
| of tape> count=<number of blocks on tape>
| if you don't have /dev/random ( not on a lot of older platforms ),  
| you should be able to use /dev/zero.

Depending on your OS, you might prefer /dev/urandom.  At least under
Linux, /dev/random blocks when it runs out of entropy, and so to come
up with many gigabytes to erase a tape would take ages.  A quick test
on my computer showed /dev/random emitting data at about 16 bytes/s --
so that 5 GB tape will take about 10 years to erase.  Perhaps you can
speed this up signifigantly, but ...

/dev/urandom will reuse it's entropy once it runs out, so it's go MUCH
faster.  (And the data will probably be more than random enough.)
Using /dev/zero, especially just once, will certainly make reading the
tape much harder, but I wouldn't rely on it to protect sensitive data
from anybody who has physical access to the tape.

(I'm not really looking to get into secure deletion here ...)

Do be careful if you decide to use a degausser -- you need a really
strong one for modern tapes.  For example, a cheap degausser found at
Radio Shack for cassette tapes will have zero effect on a DLT tape, no
matter how long it's applied -- the tape will still be readable
without even any errors.

Doug McLaren, dougmc at frenzied.us
"Only two things are infinite, the universe and human stupidity, and
 I'm not sure about the former." Albert Einstein

More information about the rescue mailing list