If you write all zero or all one to the disk, it's still technically
possible to get the data back. The original data "sticks up" or
"sticks down" out of the constant 1's or 0's. This also works with
erased audio tapes, it's possible to extract some or most of the
original audio from an erased tape.

The US DoD has a standard for scrubbing, which is:
 - overwrite with all 1's three times
 - overwrite with all 0's three times
 - overwrite with random three times

Although, in my opinion, a "strong" RNG is not needed. Even the cheap
pseudo-random number generator will probably be good enough, if speed
is what one's after. The main thing is to overwrite with a
non-constant pattern so that the original data is difficult to
extract.



On Jan 12, 2008 7:17 PM, Gerald Timothy Quimpo
<[EMAIL PROTECTED]> wrote:
> On Fri, 2008-01-11 at 23:42 +0800, Drexx Laggui[personal] wrote:
> > [EMAIL PROTECTED] ~]# time badblocks -c 512 -s -w -t random -v /dev/sdd
> > real    0m31.177s
>
> > [EMAIL PROTECTED] ~]# time dcfldd if=/dev/urandom bs=512  of=/dev/sdd
> > real    1m7.754s
>
> > [EMAIL PROTECTED] ~]# time dd if=/dev/urandom bs=512  of=/dev/sdd
> > real    1m7.519s
>
> I think that's due to reading from /dev/urandom.  badblocks
> probably has a cheaper way to get randoms.
>
> I just ran a little C program that reads 256001 512 byte blocks
> from /dev/urandom (without writing the blocks anywhere) and that
> takes 44.9 s or so.
>
> heh, i just realized i should just have done:
>
>  time dd if=/dev/urandom of=/dev/null bs=512 count=256001
>
> which does the same thing.  that runs in 45.509 s.  So just
> reading from /dev/urandom costs you a lot of performance.  why
> not just write zeroes to the disk?



-- 
Orlando Andico
+63.2.976.8659 | +63.920.903.0335

"I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure
out how to use my telephone."
  -- Bjarne Stroustrup
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to