"sanitizing" disks: wiping swap, non-allocated space, and file-tails

David Kreil kreil at ebi.ac.uk
Sat Aug 14 17:06:59 PDT 2004


Dear Brooks,

Thank you very much for your fast and friendly response.

> > > > > > > The easiest way to scrub a disk is:
> > > > > > >
> > > > > > > dd if=/dev/random of=/dev/<disk> bs=<sthg big>
> > > > > > > <repeat a few times>
> > > >
> > > > I noticed that it will refuse to let me do that on swap, even if it is
> > > > of f. Of course, I can edit the disklabel to read "unused", run dd,
> > > > and restore the swap disklabel to "swap" but is there another way?
> > >
> > > That's broken.  Which OS are you using?
> >
> > Don't know whether I answered that before: 5.2.1-RELEASE-p9/GENERIC
> > To which list, if not fs, should I send a bug-report in your opinion?
> 
> It would help if you could test this under CURRENT.  The -geom list is
> probably a good place to report this as it's probably a geom issue
> (though it's possiably it's actually a swap issue).

Ok, I'll try and get CURRENT checked out and compiled and test it there, too.

> > apparently on its way breaking down) and now get ~50MB/s write
> > performance for dd if=/dev/zero, and ~13MB/s for /dev/random. So if
> > I could generate good pseudo-random numbers fast enough, I should be
> > able to wipe a 10GB partition 20x in an hour - that's good enough!
> 
> The arc4random call will be good enough for most purposes, especially is
> you reseed it before each run and discard the first 256 bytes.
> 
> [...]
>
> > > I've got such an application, but I haven't had time
> > > to clean it up and submit it for release.  I'll probably do it some day,
> > > but I can't recommend waiting for that.  It's only about 800 lines of
> > > code including the man page and a fancy composable operations system to
> > > allow just about any DoD or non-DoD pattern or writes and verifies to be
> > > written on the command line.
> >
> > I'd be grateful if you could make your utility available. All I need
> > is random patterns (white noise). Would that be possible at all,
> > please?
> 
> My program can do that.  I'll see what I need to do to get it released.

That is great, thank you very much!

> It may take a little while.

I understand. Can you give me a rough idea at all of when you might find the 
time?


With many thanks again and best regards,

David.


------------------------------------------------------------------------
Dr David Philip Kreil                 ("`-''-/").___..--''"`-._
Research Fellow                        `6_ 6  )   `-.  (     ).`-.__.`)
University of Cambridge                (_Y_.)'  ._   )  `._ `. ``-..-'
++44 1223 764107, fax 333992         _..`--'_..-_/  /--'_.' ,'
www.inference.phy.cam.ac.uk/dpk20   (il),-''  (li),'  ((!.-'




More information about the freebsd-fs mailing list