Open cmurf opened 2 years ago
Remember that a downloaded raw image won't be sparse at all. I just tried fstrim on partition 4 of a locally built image:
1815280 -r--r--r--. 1 bgilbert bgilbert 2943352832 Jan 17 14:31 fedora-coreos-35.20220117.dev.0-metal.x86_64.raw
1805848 -rw-r--r--. 1 bgilbert bgilbert 2943352832 Jan 17 14:38 fedora-coreos-35.20220117.dev.0-metal.x86_64.raw.fstrim
So yes, there's room for some improvement, but it's not quite as bad.
Describe the enhancement Configure qemu to pass down discards when building images, e.g.
Key portion is -> discard="unmap"
System details
fedora-coreos-35.20220103.2.1-metal.x86_64.raw
Additional information
On IRC, Colin is pretty sure coreos assembler does fstrim before the final teardown/umount, and that most likely reason the image is made smaller manually (above) is qemu io devices by default do not pass down discards, rendering the fstrim prior to umount ineffective.