From owner-freebsd-fs@FreeBSD.ORG Sat Aug 14 04:45:36 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C636616A4CE for ; Sat, 14 Aug 2004 04:45:36 +0000 (GMT) Received: from maui.ebi.ac.uk (maui.ebi.ac.uk [193.62.196.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86B6643D31 for ; Sat, 14 Aug 2004 04:45:35 +0000 (GMT) (envelope-from kreil@ebi.ac.uk) Received: from puffin.ebi.ac.uk (puffin.ebi.ac.uk [193.62.196.89]) by maui.ebi.ac.uk (8.11.7+Sun/8.11.7) with ESMTP id i7E4j9F19279; Sat, 14 Aug 2004 05:45:09 +0100 (BST) Received: from puffin.ebi.ac.uk (kreil@localhost) by puffin.ebi.ac.uk (8.11.6/8.11.6) with ESMTP id i7E4j8001670; Sat, 14 Aug 2004 05:45:09 +0100 Message-Id: <200408140445.i7E4j8001670@puffin.ebi.ac.uk> X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 To: Brooks Davis In-Reply-To: Your message of "Tue, 20 Jul 2004 15:00:33 PDT." <20040720220033.GA12560@Odin.AC.HMC.Edu> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 14 Aug 2004 05:45:08 +0100 From: David Kreil X-EBI-Information: This email is scanned using www.mailscanner.info. X-EBI: Found to be clean X-EBI-SpamCheck: not spam, SpamAssassin (score=-8, required 5, HABEAS_SWE -8.00) cc: freebsd-fs@freebsd.org cc: David Kreil Subject: Re: "sanitizing" disks: wiping swap, non-allocated space, and file-tails X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2004 04:45:37 -0000 Dear Brooks, > > > > > The easiest way to scrub a disk is: > > > > > > > > > > dd if=/dev/random of=/dev/ bs= > > > > > > > > > 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? > > Also, I've just done some tests, and > > > > dd if=/dev/random of=/dev/ bs=1048576 > > > > only writes at 6.5MB/s on my system (/dev/zero gives 7.9MB/s). Is that=20 > > typical? My drives theoretically should do 30-40MB/s on read, and > > 20-30MB/s on write. > > > > If these results are "normal", however, that means, for a 10GB swap file > > and, say 6 wipes, I'd be waiting 3h on shutdown, while a BND-safe thorough > > 20 wipes would take half a day. Not really practical :-/ > > So unless you tell me that I should be able to achieve much faster write > > speeds, I think I'll have to ditch the idea of regularly wiping swap (or > > anything else for that matter). Actually, I just had one of the drives in my RAID replaced (which was 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! > If you > really want performance, you should use arc4random in a custom userland > program. That's faster, but expect wiping a 40GB disk to take hours > even in that case. 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? With 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),' ((!.-'