Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Zeroing unused FFS blocks



On Fri, 25 Jan 2008, Martti Kuparinen wrote:
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?

Run that dd (and rm) command on shutdown?
I guess you could also fiddle with vnd(4)...


 - Hubert



Home | Main Index | Thread Index | Old Index