thanks for your answer. But i'm still confused, because i thought that
the content of /sys/block/dm-X/queue/discard* in the VM OS should depend
on the setting of the "discard=(unmap|ignore)" setting in the qemu-kvm
command. Unexpectedly it's the same in both cases (it's >0, saying
discard is 'on'). I was then trying to inquire about the TRIM/UNMAP
capability of block devices in the VM with "sdparm -p lbp /dev/sdx", but
i always get "Logical block provisioning (SBC) mode subpage failed".
I know i can (and should) look at the storage array to see if
TRIM/UNMAP _actually_ works, but documentation
(https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt) says it
should be visible beforehand to my understanding.
Am 2018-02-11 um 08:55 schrieb Idan Shaby:
When the guest executes a discard call of any variation (fstrim,
blkdiscard, etc.), the underlying thinly provisioned LUN is the one that
changes - it returns the unused blocks to the storage array and gets
Therefore, no change is visible to the guest OS.
If you want to check what has changed, go to the storage array and check
what's the size of the underlying thinly provisioned LUN before and
after the discard call.
The answer for your question and some more information can be found in
the feature page  (needs a bit of an update, but most of it is still
If you got any further questions, please don't hesitate to ask.
 Pass discard from guest to underlying storage -
On Thu, Feb 8, 2018 at 2:08 PM, Matthias Leopold
i'm sorry to bother you again with my ignorance of the DISCARD
feature for block devices in general.
after finding several ways to enable "discard=unmap" for oVirt disks
(via standard GUI option for iSCSI disks or via "diskunmap" custom
property for Cinder disks) i wanted to check in the guest for the
effectiveness of this feature. to my surprise i couldn't find a
difference between Linux guests with and without "discard=unmap"
enabled in the VM. "lsblk -D" reports the same in both cases and
also fstrim/blkdiscard commands appear to work with no difference.
Why is this? Do i have to look at the underlying storage to find out
what really happens? Shouldn't this be visible in the guest OS?
Users mailing list
IT Systems & Communications
Medizinische Universität Wien
Spitalgasse 23 / BT 88 /Ebene 00
Tel: +43 1 40160-21241
Fax: +43 1 40160-921200
Users mailing list