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.