Open
Description
I observed that the virtio-blk device in libkrun does not support the discard command, which results in the following error when I run:
fstrim -v /mnt/vda/
fstrim: /mnt/vda/: the discard operation is not supported
In Orbstack there is no issue when I do fstrim
.
I used krun_add_disk
to add a sparse file (which created by truncate -s 10G ~/data1.img
) as /dev/vda
to the guest.
and I found that krun_add_disk
does not expose discard related control parameters. In qemu, I can pass the discard=unmap
like this:
<disk>
<driver name='qemu' type='qcow2' discard='unmap' detect_zeroes='unmap'>
<target dev='...' bus='scsi'>
</disk>
Does libkrun's virtio-blk implementation support the DISCARD instruction?
Metadata
Metadata
Assignees
Labels
No labels