[CentOS] claiming unsused space back

Mon Jul 31 16:03:46 UTC 2017
Warren Young <warren at etr-usa.com>

On Jul 31, 2017, at 7:50 AM, Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:
> 
> On Mon, Jul 31, 2017 at 08:28:49AM -0500, Leroy Tennison wrote:
>> dd to totally fill the partition 
> 
> I may be blind, but I don't seehow that technique can "reclaim" any space.

In addition to the OP’s qemu case, zeroing the free space can also be valuable when building binary OS images from physical media.

The first time you do it with a fresh drive, the disk image contains only what you put onto the drive.  Then later when you update that drive for the next release, you cause files to be overwritten, thus leaving outdated copies of file system blocks laying around which you don’t want to be dd’d into the resulting disk image.

Zeroing the free space not only prevents inclusion of these discarded FS blocks, they compress better, too.