Hi:
I am using qemu 8.0 comes with RHEL 9.3. I have some vm hosted at hard disk thick-provisioned lvm. I want the vm to see the virtual disk as "normal hard disk", not "thin provisioned disk".
I test the parameter "discard=unmap" and "discard=ignore" and found there is no difference for the type of virtual disk under the vm. with "discard=ignore" indeed the trim request from vm was ignored by host, but vm still think it was using thin-provisioned disk. "fstrim /" get successful result and "lsblk -D" also shows the disk as trimmable.
and "info qtree" always shows "discard = true". I have tried virtio-blk and virtio-scsi and result are the same.
it said that qemu will set "VIRTIO_BLK_F_DISCARD bit" and the driver will follow it and report disk type to vm. I don't know if it is possible to tell qemu not to set the discard bit ?(eg: like 'discard=off' instead 'discard=ignore') I can not find information about it.
thanks a lot for help!