qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to disable(not ignore) disk discard feature


From: d tbsky
Subject: how to disable(not ignore) disk discard feature
Date: Mon, 8 Jan 2024 17:20:30 +0800

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. 

    I found some discussiond about this at https://bugzilla.redhat.com/show_bug.cgi?id=1754822#c26
 
   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!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]