I have a pile of old unencrypted backup tapes I want to discard, and I'm looking for a really simple and free erase method.
I have previously used the following method to zero hard drives on linux. There's no progress indicator, but it runs as fast as possible:
cat /dev/zero > /dev/hda
(minutes pass.....)
cat: No space left on device
Is this just as effective on tape devices, since linux treats everything as a block device?
Booting the old server with Knoppix 7.4, I see:
/dev/tape/by-path/pci-0000:02:05.0-scsi-0:0:5:0
/dev/tape/by-path/pci-0000:02:05.0-scsi-0:0:5:0-nst
This is a Quantum DLT-V4 half-height SCSI drive.
I don't know which of the two device names I should use for wiping, but I assume it's the non-rewind "-nst" device.
Is it good enough to insert a tape to kill, and type:
cat /dev/urandom > /dev/tape/by-path/pci-0000:02:05.0-scsi-0:0:5:0-nst
Then when done (no space left on device), just eject and discard the tape?
Is it "just that easy", or am I overlooking something?
===FOLLOWUP===
I don't know how this website expects replies to comments to be handled. So I'm editing the question..
Time to wipe: To me, there is no issue setting up a wipe job for hours and changing the tape the next day or whatever. The server in question has been sitting unused and powered down for two years, so it really does not matter how long wiping takes.
I am not doing any device setup before writing so it may have hardware compression enabled, but overwriting with urandom pretty much guarantees the compression will be ineffective and the overwrite will be fast.
Rewinding: When a DLT tape is freshly loaded, isn't it already fully rewound? If not, issuing a "mt rewind" only takes a minute.
mt erase: The documentation of this command is ridiculously short. "Erases the tape." Okay, how? Zeroes the tape? Or overwrites with random data? No additional info seems to be available, and I don't know how to find out. Does it erase just a couple blocks at the front to make it appear empty, or the entire tape? Would I have to look at the command's source code to know?
mt erase
man mtmt erase
issues a SCSI erase command. Search the SCSI command reference for your drive to know what it specifically supports.