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.

  • nzdjinn
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    That sounds fine, but what is the actually did command you are running? A simple dd if=/dev/zero of=/dev/sdf bs=1m should be all you need. If you are using dd, run iotop or something similar in the background to see if there’s any writing actually happen.

    When you say dd “stops” does it just quit? If so it might be the dock briefly disconnecting, you should be able to see this happen by watching dmesg with dmesg -w as you are running your dd command.

  • dragonfly4933@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Could be a bad dock or usb controller, try a different one. Otherwise just snap the sata connector off, and most people will not bother to get anything off.

  • ono@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I prefer shred for erasing magnetic drives. dd can work too, but its options are arcane enough that it’s easy to make mistakes that lead to weird behavior.

    If that doesn’t fix the unexpected size problem, I would suspect the USB bridge in your dock. Those things are notoriously buggy.

    Connecting directly with SATA is a more reliable approach. It also lets you use hdparm to tell the drive to run a secure erase cycle on itself.