 |
|
 |
|
Next: masquerade as?
|
| Author |
Message |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 1) Posted: Tue Sep 29, 2009 7:20 pm
Post subject: dd progress info for long operations Archived from groups: alt>os>linux>slackware (more info?)
|
|
|
Hi there,
Preparing an old hdd for reuse, first I want to wipe it to zeroes
with dd. I'm curious about progress too, so here's how to see the
dd status each ten seconds.
clear hdd:
~# dd if=/dev/zero bs=4k of=/dev/hdc
discover pid:
~$ ps aux|grep dd\ |grep -v grep
root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
^^^^
In another root terminal, drive the dd status request signal:
~# while :; do kill -usr1 1685; sleep 10; done
Each dd progress report looks like:
8721060+0 records in
8721060+0 records out
35721461760 bytes (36 GB) copied, 1366.35 seconds, 26.1 MB/s
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Nov 01, 2008 Posts: 9
|
(Msg. 2) Posted: Tue Sep 29, 2009 9:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Grant wrote:
> Preparing an old hdd for reuse, first I want to wipe it to zeroes
> with dd. I'm curious about progress too, so here's how to see the
> dd status each ten seconds.
Don't do that in a busybox environment. The dd implementation just
quits when it receives the signal.
/S. |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 3) Posted: Tue Sep 29, 2009 9:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 30 Sep 2009 02:21:21 +0200, Simon Sibbez <simon.sibbez.TakeThisOut@buerotiger.de> wrote:
>Grant wrote:
>
>> Preparing an old hdd for reuse, first I want to wipe it to zeroes
>> with dd. I'm curious about progress too, so here's how to see the
>> dd status each ten seconds.
>
>Don't do that in a busybox environment. The dd implementation just
>quits when it receives the signal.
Learn something every day
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Sep 04, 2007 Posts: 15
|
(Msg. 4) Posted: Tue Sep 29, 2009 9:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-09-29 at 20:30 ADT, Grant <g_r_a_n_t_ RemoveThis @bugsplatter.id.au> wrote:
> Hi there,
>
> Preparing an old hdd for reuse, first I want to wipe it to zeroes
> with dd. I'm curious about progress too, so here's how to see the
> dd status each ten seconds.
>
> clear hdd:
> ~# dd if=/dev/zero bs=4k of=/dev/hdc
>
> discover pid:
> ~$ ps aux|grep dd\ |grep -v grep
> root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
> ^^^^
>
> In another root terminal, drive the dd status request signal:
> ~# while :; do kill -usr1 1685; sleep 10; done
killall is your friend...
$ killall -usr1 dd
(assuming you only have the one dd running, of course)
Jim |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 5) Posted: Tue Sep 29, 2009 11:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 29 Sep 2009 23:06:34 -0300, Jim Diamond <Jim.Diamond DeleteThis @nospam.AcadiaU.ca> wrote:
>On 2009-09-29 at 20:30 ADT, Grant <g_r_a_n_t_ DeleteThis @bugsplatter.id.au> wrote:
>> Hi there,
>>
>> Preparing an old hdd for reuse, first I want to wipe it to zeroes
>> with dd. I'm curious about progress too, so here's how to see the
>> dd status each ten seconds.
>>
>> clear hdd:
>> ~# dd if=/dev/zero bs=4k of=/dev/hdc
>>
>> discover pid:
>> ~$ ps aux|grep dd\ |grep -v grep
>> root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
>> ^^^^
>>
>> In another root terminal, drive the dd status request signal:
>> ~# while :; do kill -usr1 1685; sleep 10; done
>
>killall is your friend...
>
>$ killall -usr1 dd
>
>(assuming you only have the one dd running, of course)
Well, if you had several running, each in its own terminal?
Hmm, almost worked...
root@deltree:~# while :; do killall -usr1 dd; sleep 10; done
Cannot find user sr1
^C
root@deltree:~# while :; do killall -USR1 dd; sleep 10; done
And yes, two running instances of dd updated together
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Sep 30, 2009 Posts: 1
|
(Msg. 6) Posted: Wed Sep 30, 2009 9:19 am
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Grant wrote:
> Hi there,
>
> Preparing an old hdd for reuse, first I want to wipe it to zeroes
> with dd. I'm curious about progress too, so here's how to see the
> dd status each ten seconds.
>
> clear hdd:
> ~# dd if=/dev/zero bs=4k of=/dev/hdc
>
> discover pid:
> ~$ ps aux|grep dd\ |grep -v grep
> root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
> ^^^^
>
> In another root terminal, drive the dd status request signal:
> ~# while :; do kill -usr1 1685; sleep 10; done
>
> Each dd progress report looks like:
> 8721060+0 records in
> 8721060+0 records out
> 35721461760 bytes (36 GB) copied, 1366.35 seconds, 26.1 MB/s
>
> Grant.
Another method is to use the ddrescue command like the following.
ddrescue -v -b4k /dev/zero /dev/hdc
Harold |
|
| Back to top |
|
 |  |
External

Since: Sep 04, 2007 Posts: 15
|
(Msg. 7) Posted: Wed Sep 30, 2009 9:20 am
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-09-29 at 23:23 ADT, Grant <g_r_a_n_t_.DeleteThis@bugsplatter.id.au> wrote:
> On Tue, 29 Sep 2009 23:06:34 -0300, Jim Diamond <Jim.Diamond.DeleteThis@nospam.AcadiaU.ca> wrote:
>
>>On 2009-09-29 at 20:30 ADT, Grant <g_r_a_n_t_.DeleteThis@bugsplatter.id.au> wrote:
>>> Hi there,
>>>
>>> Preparing an old hdd for reuse, first I want to wipe it to zeroes
>>> with dd. I'm curious about progress too, so here's how to see the
>>> dd status each ten seconds.
>>>
>>> clear hdd:
>>> ~# dd if=/dev/zero bs=4k of=/dev/hdc
>>>
>>> discover pid:
>>> ~$ ps aux|grep dd\ |grep -v grep
>>> root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
>>> ^^^^
>>>
>>> In another root terminal, drive the dd status request signal:
>>> ~# while :; do kill -usr1 1685; sleep 10; done
>>
>>killall is your friend...
>>
>>$ killall -usr1 dd
>>
>>(assuming you only have the one dd running, of course)
>
> Well, if you had several running, each in its own terminal?
>
> Hmm, almost worked...
>
> root@deltree:~# while :; do killall -usr1 dd; sleep 10; done
> Cannot find user sr1
> ^C
> root@deltree:~# while :; do killall -USR1 dd; sleep 10; done
mea culpa!
> And yes, two running instances of dd updated together
What the heck, why not go for 3 or 4 ?
I'm sort of curious about the filling it with zeroes... was there top
secret stuff on it?
Jim |
|
| Back to top |
|
 |  |
External

Since: Sep 09, 2005 Posts: 92
|
(Msg. 8) Posted: Wed Sep 30, 2009 1:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harold <harold.RemoveThis@everywhere.com> wrote:
> Another method is to use the ddrescue command like the following.
> ddrescue -v -b4k /dev/zero /dev/hdc
Yet another method is to use some buffer program which displays progress
to stderr. There are different programs to choose from, one of my
favorites is bfr, http://www.glines.org/software/bfr
dd if=/dev/zero | bfr -p | dd of=/dev/hdc
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc3(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 9) Posted: Wed Sep 30, 2009 3:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 30 Sep 2009 10:04:09 -0300, Jim Diamond <Jim.Diamond DeleteThis @nospam.AcadiaU.ca> wrote:
>On 2009-09-29 at 23:23 ADT, Grant <g_r_a_n_t_ DeleteThis @bugsplatter.id.au> wrote:
>> On Tue, 29 Sep 2009 23:06:34 -0300, Jim Diamond <Jim.Diamond DeleteThis @nospam.AcadiaU.ca> wrote:
>>
>>>On 2009-09-29 at 20:30 ADT, Grant <g_r_a_n_t_ DeleteThis @bugsplatter.id.au> wrote:
>>>> Hi there,
>>>>
>>>> Preparing an old hdd for reuse, first I want to wipe it to zeroes
>>>> with dd. I'm curious about progress too, so here's how to see the
>>>> dd status each ten seconds.
>>>>
>>>> clear hdd:
>>>> ~# dd if=/dev/zero bs=4k of=/dev/hdc
>>>>
>>>> discover pid:
>>>> ~$ ps aux|grep dd\ |grep -v grep
>>>> root 1685 30.7 0.2 1892 708 pts/3 R+ 09:06 5:48 dd if /dev/zero bs 4k of /dev/hdc
>>>> ^^^^
>>>>
>>>> In another root terminal, drive the dd status request signal:
>>>> ~# while :; do kill -usr1 1685; sleep 10; done
>>>
>>>killall is your friend...
>>>
>>>$ killall -usr1 dd
>>>
>>>(assuming you only have the one dd running, of course)
>>
>> Well, if you had several running, each in its own terminal?
>>
>> Hmm, almost worked...
>>
>> root@deltree:~# while :; do killall -usr1 dd; sleep 10; done
>> Cannot find user sr1
>> ^C
>> root@deltree:~# while :; do killall -USR1 dd; sleep 10; done
>mea culpa!
>
>> And yes, two running instances of dd updated together
>What the heck, why not go for 3 or 4 ?
Because it's a single drive and all one does is lose time in head
seeking, so writing two adjacent partitions ran at about half speed.
But if I was lucky enough to be wiping 5 drives in parallel? It'd
be fun. But I haven't had that many drives in one spot since once
I bought 5 x 270MB SCSI drives to play with RAID about a decade ago,
discovering RAID on narrow scsi was a silly idea
>
>I'm sort of curious about the filling it with zeroes... was there top
>secret stuff on it?
No. Filling a drive with zeroes gives the hdd controller a chance to
remap any iffy sectors. Modern hdd lie to OS about sector size, so
an iffy sector can only be replaced when OS asks for entire 'real'
(much larger) sector is written. Thus writing all zeroes to a drive
is somewhat like the old 'low level format'.
In fact this is all that the Seagate disk recovery software (for
warranty testing) does, write zeroes to entire drive then test it.
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 10) Posted: Wed Sep 30, 2009 3:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 30 Sep 2009 09:19:14 -0400, Harold <harold.TakeThisOut@everywhere.com> wrote:
....
>Another method is to use the ddrescue command like the following.
>
>
>ddrescue -v -b4k /dev/zero /dev/hdc
~# ddrescue --version
-bash: ddrescue: command not found
Not in slack-11
Didn't ddrescue features get folded into dd? Or was that a special
dd I saw somewhen?
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 27
|
(Msg. 11) Posted: Wed Sep 30, 2009 3:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Hallo, Grant,
Du meintest am 01.10.09:
>> Another method is to use the ddrescue command like the following.
>>
>>
>> ddrescue -v -b4k /dev/zero /dev/hdc
> ~# ddrescue --version
> -bash: ddrescue: command not found
> Not in slack-11
Try "linuxpackages.net", search for "any" version. You'll find
"ddrescue-1.10-i486-1McD.tgz".
> Didn't ddrescue features get folded into dd?
No - sorry.
Viele Gruesse
Helmut
"Ubuntu" - an African word, meaning "Slackware is too hard for me". |
|
| Back to top |
|
 |  |
External

Since: Dec 06, 2004 Posts: 75
|
(Msg. 12) Posted: Wed Sep 30, 2009 5:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Grant wrote:
>>killall is your friend...
>>$ killall -usr1 dd
> root@deltree:~# while :; do killall -USR1 dd; sleep 10; done
>
> And yes, two running instances of dd updated together
Even more elegant?
watch -n 10 killall -USR1 dd
--
----------------------------------------------------------------------
Sylvain Robitaille syl.TakeThisOut@encs.concordia.ca
Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
---------------------------------------------------------------------- |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 13) Posted: Wed Sep 30, 2009 9:20 pm
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 30 Sep 2009 21:23:26 +0000 (UTC), Sylvain Robitaille <syl.TakeThisOut@alcor.concordia.ca> wrote:
>Grant wrote:
>
>>>killall is your friend...
>>>$ killall -usr1 dd
>
>> root@deltree:~# while :; do killall -USR1 dd; sleep 10; done
>>
>> And yes, two running instances of dd updated together
>
>Even more elegant?
>
> watch -n 10 killall -USR1 dd
I never used watch -- it's hidden under a few high use-polished tools
over in the far corner
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 14) Posted: Sat Oct 03, 2009 3:20 am
Post subject: Re: dd progress info for long operations [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 30 Sep 2009 02:21:21 +0200, Simon Sibbez <simon.sibbez.DeleteThis@buerotiger.de> wrote:
>Grant wrote:
>
>> Preparing an old hdd for reuse, first I want to wipe it to zeroes
>> with dd. I'm curious about progress too, so here's how to see the
>> dd status each ten seconds.
>
>Don't do that in a busybox environment. The dd implementation just
>quits when it receives the signal.
Slack-13 (32bit) installer's dd works fine handling this signal today.
Busybox dd didn't show bytes transferred, so I used 'bs=1M'
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|