Hi, Le 22 déc. 09 à 17:47, Osamu Aoki a écrit :
Hi, FYI:First, pactically the same thing as "zerofree" can be done with dd whilein (loop) mounted image file. $ dd if=/dev/zero of=junk; sync; rm junk
Yes, that even is in the zerofree manpage I believe.
So unless this tool can do in-place zeroing without growing file, this isuseless.
It does in-place zeroing without growing file size. This is why the filesystem has to be unmounted or mounted read only: zerofree does not create any file, it scans the entire filesystem and looks for blocks which are both unallocated and not zero. It fills those blocks with zeroes. If the file system was mounted read-write, that would cause a race condition since the block could have been allocated between the time when zerofree determined it must be zeroed and the time it does zero it.
I have _tested_ the software and _read_ the code, it does what it claims. On the other hand, it doesn't _decrease_ the disk image size either. Read on.
When reading http://intgat.tigress.co.uk/rmy/uml/index.html, I learn this "zerofree" command togeher with "sparsify" command available from http://intgat.tigress.co.uk/rmy/uml/sparsify.c . But this points out that zerofree grows file size. This beat the purpose for me.
I have not looked in detail at what sparsify does. My understanding is that sparsify is the one which reduces file size. sparsify is useless for me since I use the virtual box utilities for that, and I haven't given enough thought to determine whether sparsify would do the right thing on a virtualbox disk image.
Regards, Thibaut. --* Dr Thibaut Paumard | LESIA/CNRS - B. Lyot (n °6) * * Tel: +33 1 45 07 75 45 | Observatoire de Paris - Section de Meudon * * Fax: +33 1 45 07 79 17 | 5, Place Jules Janssen * * [email protected] | 92195 MEUDON CEDEX (France) *
smime.p7s
Description: S/MIME cryptographic signature

