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. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
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 otherwisefstrim 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
On Sun, 18 Feb 2018, Richard W.M. Jones wrote:> 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.Last time I used it (a year ago?) it worked properly for ext3 and ext4, but on RHEL rather on Fedora. Not sure which features you are talking about in detail, but bumping zerofree from 1.0.3 to 1.1.0 would add 64 bit block no. support at least... Regards, Robert
On Sun, Feb 18, 2018 at 09:19:09PM +0100, Robert Scheck wrote:> On Sun, 18 Feb 2018, Richard W.M. Jones wrote: > > 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. > > Last time I used it (a year ago?) it worked properly for ext3 and ext4, but > on RHEL rather on Fedora. Not sure which features you are talking about in > detail, but bumping zerofree from 1.0.3 to 1.1.0 would add 64 bit block no. > support at least...Would fstrim or virt-sparsify have worked for you? I feel that supporting something which has been rejected by the e2fsprogs community is difficult, especially when it concerns data integrity. If you wish to take it over, I can orphan it instead. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Rich, Thanks for packaging zerofree. It's been great to be able to install my own software without having to build it. Richard W.M. Jones wrote:>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.It works for ext2, ext3 and ext4. It zeros free blocks; sparsifying is a different issue.>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.To the best of my knowledge it does not corrupt ext4 filesystems. The only thing zerofree cares about is free blocks. Filesystem features that affect files, directories or inodes are irrelevant to zerofree. zerofree get its information about free blocks from the ext2fs library. However free blocks may be represented on disk the library provides the abstraction necessary to access them.>I feel that supporting something which has been rejected by the >e2fsprogs community is difficult, especially when it concerns data >integrity.I don't consider zerofree to have been rejected by the e2fsprogs community. Due to my fear of rejection it has never been submitted for their consideration. Ron