Zerofree your filesystem

Lets assume that you have file image:

dd if=/dev/zero of=file.1 bs=4k count=128

on top of it you create filesystem ext3/ext4

mkfs.ext4 /root/file.1

mount it, create remove some files etc. and you gonna make it more space efficient, that’s why

zerofree /root/file.1

on umount filesystem in result you get unallocated space zeroed. Zeros of course are easily to compress or deduplicate and you save some space. In the same way you can treat virtual disk image. More about that on

http://rwmj.wordpress.com/2010/05/18/tip-compress-raw-disk-images-using-qcow2/

comments powered by Disqus

powered by Hugo and Noteworthy theme