You are not logged in.

#1 2009-04-08 20:49:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

using dd to zero out a HDD prior to returning it to Seagate...

Basically, I have a 750 HDD that is getting RMA'ed to Seagate, but I wanna wipe it clean of my files.  I'm doing the following:

# dd if=/dev/zero of=/dev/sdd1

This is my first time using dd and I'm noticing that it doesn't give my any feedback as to progress, time remaining etc.  Do you guys have any thoughts as to the time it should take to wipe out the entire partition?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2009-04-08 20:53:16

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: using dd to zero out a HDD prior to returning it to Seagate...

Estimating a conservative 50 MB/s write speed... 4 hours or so.

And you might want to aim that dd at /dev/sdd (the entire drive) not just /dev/sdd1 (the first partition).

Last edited by Odysseus (2009-04-08 20:55:14)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#3 2009-04-08 20:56:19

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

Thanks for the reply... I thought /dev/sdd would be the MBR on /dev/sdd?  Luckily, it only has one enormous partition smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2009-04-08 21:01:26

Nicolae
Member
Registered: 2008-12-08
Posts: 9

Re: using dd to zero out a HDD prior to returning it to Seagate...

kill -USR1 `pidof dd` should make it print progress to screen.

Offline

#5 2009-04-08 21:07:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

Nicolae wrote:

kill -USR1 `pidof dd` should make it print progress to screen.

Hmm... I should execute this from a second shell as root?  I executed the above command in its own shell and it has been running for a good 1/2 hour now...

Last edited by graysky (2009-04-08 21:08:54)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2009-04-08 21:10:35

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: using dd to zero out a HDD prior to returning it to Seagate...

nvm

Last edited by Odysseus (2009-04-08 21:11:00)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#7 2009-04-08 21:13:58

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: using dd to zero out a HDD prior to returning it to Seagate...

Also consider DBAN.

Offline

#8 2009-04-08 21:25:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

Odysseus wrote:

nvm

??


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2009-04-08 21:38:42

Nicolae
Member
Registered: 2008-12-08
Posts: 9

Re: using dd to zero out a HDD prior to returning it to Seagate...

graysky wrote:
Nicolae wrote:

kill -USR1 `pidof dd` should make it print progress to screen.

Hmm... I should execute this from a second shell as root?  I executed the above command in its own shell and it has been running for a good 1/2 hour now...

Yeah, just run it in another shell.

Offline

#10 2009-04-08 22:17:20

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

# kill -USR1 6806

Gave the following in the original shell:

dd if=/dev/zero of=/dev/sdd1
112734781+0 records in
112734781+0 records out
57720207872 bytes (58 GB) copied, 6175.38 s, 9.3 MB/s

Amazing... so in 1.3 hours it only did 58 GB?  Doesn't that seem kinda slow for a modern 7200 SATAII drive?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2009-04-08 23:02:47

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

graysky wrote:

Amazing... so in 1.3 hours it only did 58 GB?  Doesn't that seem kinda slow for a modern 7200 SATAII drive?

You can try increasing the size of blocks it writes with:

dd if=/dev/zero of=/dev/sdd1 bs=4294967296

4mb blocks. I find this works much quicker.

Last edited by fukawi2 (2009-04-08 23:03:02)

Offline

#12 2009-04-08 23:16:14

dotbmj
Member
Registered: 2009-04-08
Posts: 2

Re: using dd to zero out a HDD prior to returning it to Seagate...

graysky wrote:
# kill -USR1 6806

Gave the following in the original shell:

dd if=/dev/zero of=/dev/sdd1
112734781+0 records in
112734781+0 records out
57720207872 bytes (58 GB) copied, 6175.38 s, 9.3 MB/s

Amazing... so in 1.3 hours it only did 58 GB?  Doesn't that seem kinda slow for a modern 7200 SATAII drive?

If you don't specify a byte size the dd command will default to something very unreasonable like 1 byte, though I forget exactly what it defaults to. The point is, you need to specify the bs parameter.

e.g.:
dd if=/dev/zero of=/dev/sdd bs=1M

Would copy 1MiB chunks until it can't write any more, and even if the last chunk is less than 1MiB, it'll still write through it and then stop with an error saying the disk is full (obviously)

Last edited by dotbmj (2009-04-08 23:17:15)

Offline

#13 2009-04-08 23:25:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

ahhh.... much better.  bs=1M gave 110 MB/s as did the bs=4M ...wish I knew that 2 h ago smile

Can someone explain to me how the kill -USR1 command works exactly?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2009-04-09 00:26:55

Jack B
Member
Registered: 2006-06-27
Posts: 107
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

kill is used to send signals to programs.  One common signal you'll see is number 9, KILL, which forces a program to quit.  There are a whole load of predefined ones (KILL, TERM, HUP...), which have specific meaning, and some others which vary from program to program.  USR1 is one of theese, and dd interprets it as an instruction to print it's progress.

Last edited by Jack B (2009-04-09 00:35:51)

Offline

#15 2009-04-09 06:57:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: using dd to zero out a HDD prior to returning it to Seagate...

Cool, learned something new today.  BTW, it took just shy of 3 h to finish the entire 750 GB.

$ sudo dd if=/dev/zero of=/dev/sdd1 bs=1M
22697+0 records in
22697+0 records out
23799529472 bytes (24 GB) copied, 249.917 s, 95.2 MB/s
44978+0 records in
44978+0 records out
47162851328 bytes (47 GB) copied, 484.785 s, 97.3 MB/s
160223+0 records in
160223+0 records out
168005992448 bytes (168 GB) copied, 2102.25 s, 79.9 MB/s
209635+0 records in
209635+0 records out
219818229760 bytes (220 GB) copied, 2868.86 s, 76.6 MB/s
dd: writing `/dev/sdd1': No space left on device
715403+0 records in
715402+0 records out
750153729024 bytes (750 GB) copied, 10718 s, 70.0 MB/s

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB