I've got an Ubuntu 20 virtual machine running in qemu that uses a qcow2 disk file with another qcow2 disk file as backing store. The VM was built from a recent Canonical-distributed cloud image with cloud-init.
As soon as I start it up, its disk file starts getting bigger and bigger at a rate of about a gigabyte every five minutes.
It's an ext4 file system and no swap is configured. The thin provisioned disk image is configured for 1 TB, with only 4.2 GB actually in use; the disk image itself is 4.4 GB. All the virtual machine is doing is booting and starting its GUI.
"iotop" shows "ext4lazyinit" running, so I think it's initializing inode tables.
When I shut it down and check its disk image with debugfs's "dump_unused", it shows all kinds of random data in its unused disk blocks.
What I don't understand is why it's doing this if the disk is zero'ed, and why it writes all this random clutter.
Are empty inode tables all zero on ext4? Does it perhaps write a small portion of a disk block as an inode table, then the rest of the disk block is filled with junk instead of being all zeros? Any way to get it to write zeros instead of garbage?