Subject: Zeroing unused FFS blocks
To: None <port-xen@netbsd.org>
From: Martti Kuparinen <martti.kuparinen@iki.fi>
List: port-xen
Date: 01/25/2008 13:29:37
Hi,

I created a large file (say 10 GB with "dd if=/dev/zero of=filename bs=1m 
count=10k") on my Xen dom0. Then I used this file as a virtual hard drive for my 
NetBSD domU. When the domU is running, it sometimes uses almost all the disk 
space for some temporary files and then later removes those files.

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?

Martti