The goal in my case is not to securely erase data, but simply to force sector reallocation by the drives firmware.
I have a drive that has had a few file corruptions. It seems to be due to getting very hot at some point in the past, the max reported temperature is 99C ! I've recovered as much data from it as I can with ntfsclone --rescue and mounted the image.
The reallocated sector count is zero but the current pending sector count is 233.
If I write to the sectors then they will either be remapped or have their status restored , I'm wondering which is faster badblocks -w or dd or something else?
I've observed with iotop that badblocks is writing at about 17Mb/s which I don't think is very fast for this drive. dd from /dev/zero gives about 24Mb/s but it pauses frequently and the average seems about 13.5Mb/s, again seems too slow for this drive. At this rate it would take a whole day and night to zero the drive.
Perhaps I'm not using dd correctly and there are betters ways to make a large sequential write.
ddrescue
. – jofel Feb 22 '12 at 14:10