Subject: Re: Zeroing unused FFS blocks
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Curt Sampson <cjs@netbsd.org>
List: port-xen
Date: 01/26/2008 14:09:39
On 2008-01-25 13:29 +0200 (Fri), Martti Kuparinen wrote:

> Now, after halting the domU it would be very nice to compress this virtual 
> hard drive before storing it on a DVD or moving it to another server.
>
> Is there any way to zero all unused FFS blocks in order to make the 
> compressed image smaller?

If you're going to process the file anyway, before storing it or moving it,
my recommendation would be:

    dump -0 -a -F /path/to/fs/image -f - | gzip > image.dump.gz

cjs
-- 
Curt Sampson       <cjs@starling-software.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com