[buug] best way to dd lots of drives (ide, scsi, etc)
Michael Paoli
Michael.Paoli at cal.berkeley.edu
Tue Sep 8 19:33:57 PDT 2009
"best", "dd" and "data destruction" don't all correlate 100%,
so there are tradeoffs, depending upon one's objectives - but
more precise criteria wasn't specified.
If you simply want a one pass overwrite of reasonably accessible data
at maximum speed:
o be sure any BIOS setting or the like which make any part of the disk
"hidden" are disabled (tends to be a more common issue for laptops and
"desktop" type systems).
o determine optimal (or near optimal) block size and device (e.g. block
vs. character device - if applicable for your OS flavor) - once you
figure that out it typically won't vary much across drive types - at
least if you're using similar hardware to do the overwrite/"wipe".
o # dd if=/dev/zero of=/dev/highest_throughput_disk_path \
> bs=highest_throughput_block_size
o If your OS flavor doesn't provide /dev/zero, one can use a wee bit of
code (e.g. C or perl) to produce an infinite output of ASCII null
bytes, and pipe (|) that into dd (and omit the if=/dev/zero).
o These can be done in parallel (asynchronous &) - but if one does so,
one may want to take proper care to capture exit/return value and any
data written to stderr
o The above method is relatively fast, and leaves the drives useable
(e.g. for resale or donation, etc.).
o Rather than being too redundant, continue with further information
here:
http://linuxmafia.com/pipermail/sf-lug/2008q4/005770.html
(same basic stuff applies - essential tradeoffs are thoroughness,
time, reusability, convenience, risk/security, etc.)
Quoting "Bob Read" <unixjavabob at yahoo.com>:
> file under: data destruction.
> I need to dd a whole bunch of drives ( ~20/month) of different
> types (ide, scsi).
> whats the best way to dd them all?
> they're sitting in a stack in the corner.
More information about the buug
mailing list