hard-disk via virtio-blk under windows (discard_granularity=0)

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

 



Hi:
   few years ago virtio-blk device was showing as hard-disk under
windows. recent years the driver change the device to show as
thin-provisioned disk.  the change is good for ssd, but not so good
for raw hard-disk.

   under windows server 2022 the default virtio-blk situation is quite
bad, ssd trim is very slow. and defrag a bigger volume like 1TB
harddisk will always show "memory not enough", even when the volume is
empty.

  I found discussions to change the "discard_granularity" to make trim
happy again. and libvirt support the syntax like below:

   <blockio discard_granularity='2097152'/>

   I also found if I can set "discard_granularity" to zero, then
windows will recognize the device as "traditional hard drive" again
and won't do unnecessary trim to it. I want to do this for years, but
couldn't find a way to set it up like vitio-scsi's rotational
parameter.

   the sad part is if I setup it under RHEL 9.4 with librirt 10.0 like below:

  <blockio discard_granularity='0'/>

   the line will just disappear when I close "virsh edit"

    so I can only use complex  format with "<qemu:override>" to set
"discard_granularity='0'"

     I wonder if libvirt  would be changed to accept
"discard_granularity='0'" so the traditional hard-disk can be
recognized under windows again.

     or is there better ways to distinguish hard-disk/ssd/thin-disk
for virtio-blk now?

Regards,
tbskyd



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux