[geeks] Wiping disks FAST?

Jonathan C. Patschke jp at celestrion.net
Fri Mar 24 11:15:23 CST 2006


On Fri, 24 Mar 2006, Sandwich Maker wrote:
> 2. dd bs=1024k if=/dev/zero of=/path/to/raw/disk
         ^^^^^^^^

You might want to experiment with that number to find where your best
performance lies (since even a few seconds' difference over 4000 disks
can save hours of time).  Typically, it's just under the size of the
disk's cache, or just under half the size of the disk's cache, depending
on how the disk organizes its cache.

You might want to do a time trial like this:

SZ=$((1024*1024*128))
for i in 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32; do
   echo "BS = $(($i*128))"k
   BS=$(($i*128*1024))
   time dd if=/dev/zero of=/dev/rdsk/foodisk bs=$BS \
        count=$(($SZ/$BS)) 2>/dev/null
done

Alternatively, if you have 'seq' from GNU coreutils (or write your own),
you can experiment with a wide range of block sizes.

-- 
Jonathan Patschke     )       Apple MacBook Pro
Elgin, TX            (     Now with Intel Core Duo
USA                   )      Beauty is Skin Deep



More information about the geeks mailing list