Comment 5 for bug 1974100

Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: inode lazy init in a VM fills virtual disk with garbage

Finally about discard to the guest.
I see you have .... ,discard=on in your qemu commandline.
But that is only half the deal, depending on various other setup details the guest can recognize or not recognize that.

I do not know all the details of your setup but at least in the past there was quite a difference between disk types. You use if=ide and at least in the past if=scsi and maybe now if=virtio are better to transfer any kind of advanced disk features.

If e.g. above fstrim service runs but nothing happens that might be an indicator it is missing.

Here an example from mine connected via virtio:
$ lsblk --discard
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
vda 512 512B 2G 0
├─vda1 0 512B 2G 0
├─vda14 0 512B 2G 0
└─vda15 0 512B 2G 0
vdb 512 512B 2G 0