On 08/11/2014 11:13 AM, Robert Moskowitz wrote:
On 08/11/2014 04:50 AM, Ron Yorston wrote:
Gordan Bobic <[email protected]> wrote:
If you are using an image, please make sure you do:
dd if=/dev/zero of=/scrub bs=8MB; rm -f /scrub
before you create the image to zero out the free space.
I wrote the zerofree utility for just this sort of thing. It looks
for non-zero free blocks in an ext2/3/4 filesystem and zeroes them.
Because it doesn't write to blocks that are already zeroed it can be
more efficient than using dd. It only works on unmounted (or read-only)
filesystems, though.
My write-up on zerofree is here:
http://intgat.tigress.co.uk/rmy/uml/sparsify.html
For the terminally impatient:
# e2fsck -f /dev/sdx1
# zerofree -v /dev/sdx1
# e2fsck -f /dev/sdx1
The -v flag shows progress and prints the number of blocks zeroed,
total free blocks and total blocks at the end of the process. Use '-n
-v' to perform a dry run to see if it's worth bothering to zero a given
filesystem.
It's available in the standard repositories for Fedora and Debian, plus
EPEL for CentOS/RHEL 5, though not 6. I really ought to make an RPM
for 6.
Please do, and perhaps send it my way today or such?
It took ~ 5hours to apply the updates.
5 hours sounds excessive. Are you running on an SD/CF card? Or USB stick?
the compressed image grew
~500Mb; no good. I am going to have to review Gordon's comments about
how to make better saved images to see if I can tighten it up a bit.
It helps if you can mount the disk on a different machine, delete all
the logs and zero out the free space. xz -9 also helps (use pxz -9
instead of xz -9 if you have multiple cores, but bear in mind the memory
usage will be high - best done on an x86 machine.
Gordan
_______________________________________________
users mailing list
[email protected]
http://lists.redsleeve.org/mailman/listinfo/users