Am 18.02.2018 um 19:53 schrieb Richard W.M. Jones:
zerofree is a package that can take an ext2 (only?) filesystem, work
out what parts of the filesystem are not used, and either zero them or
sparsify them.
This was useful in about 2009 when I added it to Fedora. However
nowadays it's more convenient to use the equivalent kernel
functionality (via the ‘fstrim’ command or equivalent ioctls). The
kernel functionality also works correctly for other filesystem types.
There's also a more serious data safety issue: Although this probably
works OK for ext2 since that format is frozen in time, it probably
corrupts ext4 filesystems containing features that it doesn't know
about.
It is for these reasons that I don't think you should use this package
and I intend to retire it unless anyone says otherwise
fstrim don't work on VMware guests stored on NFS
fstrim don't work on VMware guests on VMFS lower than 6.0
fstrim don't work on Proxmox with SATA vritual adapters
so back to the good old:
nice -n 19 dd status=progress if=/dev/zero bs=64M of=zero.fill bs=64M
sync
nice -n 19 rm -f zero.fill