I have a stack of SATA hard drives that I need to erase.

I have a USB drive dock, a box that a drive can be set into that connects to my computer via USB-3.

I am using DD to write zeros to the raw device, in this case, /dev/sdf.

No matter the actual size of the drive dd stops at about 3 to 7 gb. These are 300 gb to 3 TB drives.

I am not mounting the drives, but I do ensure they are visible to the system with lsblk. To change drives I turn off the dock. The drive then disappears from lsblk. When I insert a different drive and turn the dock back on again /dev/sdf re-appears.

Are all my drives bad? If they are I will need to have them “professionally” destroyed at about $25 a drive.

  • Yeah. That should do it. There is also a shred tool you could try.

    sudo shred -vfz /dev/sdf

    You can also write a zero file to see if the drive is useable. That won’t erase what’s on it, but it will write all free space. If you mount the drive and delete everything on it, a zero file will in theory write zeros to the whole drive.

    mount /dev/sdf /media dd if=/dev/zero of=/media/zerofile.tmp

    I have a similar threat model. If the disks are indeed bad then a nice sledge and a trip to an e-cycle location should do it.