want to wipe a partition on my hdd. Doing this with dd if=/dev/urandom of=/dev/sdxx and get ~10MB/s (it's a WD green 2TB in USB2 external case). I tried different bs values (2048, 4096, 1M, 4M, default) but nothing helped.
Now I saw in conky that mot of the time read and write speeds are identical. So I assume that the data gets read after write, is that possible? I also tried it with shred, same behavior on read/write except it's a bit slower ~8MB/s. Perhaps this has to do something with USB. Of course I could connect with SATA directly for wiping but the problem then stays for later when I want to use it as external device...
Thanks in advance.
Thats probably caused by /dev/urandom. Check you CPU load while dd-ing.
Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse
Thanks, you're right the core dd was running on was on 100%. Nonetheless I'm wondering why conky showed the same speed for read and write.
Nonetheless I'm wondering why conky showed the same speed for read and write.
Because dd has to read the data it is going to write from somewhere.
data gets read after write
To check the hard drive's setting:
hdparm -R /dev/sda
From man hdparm:
-R Get/set Write-Read-Verify feature, if the drive supports it.
If the random generator is too slow you can try frandom instead of urandom.
Here is the wiki page about the topic in general, in case you did not already read it.
Thanks for these replies.
@ROOKIE Mh, thats not the case since the data gets read fom /dev/urandom.
@brebs Doesn't know that there are settings/drives supporting that. Good to know but it says "write-read-verify = not supported"
@teateawhy Lready done with urandom but always good to know that this exists.
So I'm still curious whats going on. And now I can say that it still happens with filesystem on that drive while copying files.
Got read = write = 30MB/s copying files from internal SATA connected to external USB 2.0 connected HDD. So overall 60MB/s what I assume it should be but just writing...
Same when using dd with /dev/zero as source just slightly faster.
Finally reading speed is ~85MB/s which seems to bee the USB 2.0 limit, so this works like expected.
Thanks again and perhaps someone can (help me) solve this.