Description of problem: def create_image_minimizer(path, image, compress_type, target_size = None, tmpdir = "/tmp"): """ Builds a copy-on-write image which can be used to create a device-mapper snapshot of an image where the image's filesystem is as small as possible The steps taken are: 1) Create a sparse COW 2) Loopback mount the image and the COW 3) Create a device-mapper snapshot of the image using the COW 4) Resize the filesystem to the minimal size 5) Determine the amount of space used in the COW 6) Restroy the device-mapper snapshot 7) Truncate the COW, removing unused space 8) Create a squashfs of the COW """ Ew. Instead, to shrink the live filesystem in use, it should just use fstrim(8) from util-linux. Should be much simpler. Version-Release number of selected component (if applicable): looking at git
Actually, this whole part can now be eliminated. Anaconda uses rsync to copy the filesystem (which is using squashfs so it is small on the iso) so we no longer need the minimized COW which was needed when directly copying blocks.