From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8BKw-0002Kv-Ci for qemu-devel@nongnu.org; Wed, 02 Aug 2006 03:40:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G8BKt-0002Jx-7F for qemu-devel@nongnu.org; Wed, 02 Aug 2006 03:40:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8BKt-0002Ju-0U for qemu-devel@nongnu.org; Wed, 02 Aug 2006 03:40:11 -0400 Received: from [212.159.106.41] (helo=bandsman.co.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G8BNw-00085l-P3 for qemu-devel@nongnu.org; Wed, 02 Aug 2006 03:43:21 -0400 Received: from [127.0.0.1] (bandsman.co.uk [127.0.0.1]) (authenticated bits=0) by bandsman.co.uk (8.13.7/8.13.7) with ESMTP id k727dvO5004236 for ; Wed, 2 Aug 2006 08:40:01 +0100 Message-ID: <44D056CD.9010702@bandsman.co.uk> Date: Wed, 02 Aug 2006 08:39:57 +0100 From: Nigel Horne MIME-Version: 1.0 Subject: Re: [Qemu-devel] Wipe patch References: <44D00D26.2050201@wasp.net.au> In-Reply-To: Content-Type: multipart/mixed; boundary="------------020103050804010104000303" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020103050804010104000303 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit andrzej zaborowski wrote: > On 02/08/06, Brad Campbell wrote: >> ZIGLIO, Frediano, VF-IT wrote: >> > Hi, >> > well, this is not a definitive patch but it works. The aim is to be >> > able to wipe the disk without allocating entire space. When you wipe a >> > disk the program fill disk with zero bytes so disk image increase to >> > allocate all space. This just patch detect null byte writes and do not >> > write all zero byte clusters. >> > >> >> I've been giving this some pretty heavy testing over the last week >> and can say I've not noticed any >> negative performance impact or any other adverse side effects, not to >> mention the speedup when doing >> re-packing (which I do fairly regularly on both ext3 and ntfs guest >> filesystems). >> >> While I'm here does anyone know of a simple program, either dos or >> linux based for wiping unused >> space on fat filesystems? The only ones I've found so far have been >> windows based. > > I don't know if you mean just zeroing unused parts or reordering the > data and stuff like defragmentation. If you mean the former, there's a > universal method: > dd if=/dev/zero of=xxx; rm xxx > where xxx is a path to a new file on the filesystem, which must be > mounted. It will creata a zero filled file there, which will fill all It would be wise to sync as well, to ensure the zeros are actually written and not stored in cache where the rm would remove them: dd if=/dev/zero of=xxx; sync; rm xxx > availiable space, and remove the file afterwards. I used this when I > needed to send filesystem images through internet so that they > compressed well. > If you add dd= it might take less time to write the > file. > >> > > Regards, --------------020103050804010104000303 Content-Type: text/x-vcard; charset=utf-8; name="njh.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="njh.vcf" YmVnaW46dmNhcmQNCmZuOk5pZ2VsIEhvcm5lDQpuOkhvcm5lO05pZ2VsDQpvcmc6TkpIIE11 c2ljDQplbWFpbDtpbnRlcm5ldDpuamhAYmFuZHNtYW4uY28udWsNCngtbW96aWxsYS1odG1s OkZBTFNFDQp1cmw6aHR0cDovL3d3dy5iYW5kc21hbi5jby51aw0KdmVyc2lvbjoyLjENCmVu ZDp2Y2FyZA0KDQo= --------------020103050804010104000303--