<div dir="ltr"><div><div>Right, but I just wanted to emphasize that disabling "Enable Discard" for that disk will cause qemu to ignore these UNMAP commands and not pass it on to the underlying storage.<br></div>So if you've got this flag disabled, there's no reason to use fstrim. It makes sense to use it only when enabling "Discard enabled".<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br>Regards,<br></div>Idan<br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sun, Jun 18, 2017 at 11:13 AM, Fabrice Bacchella <span dir="ltr"><<a href="mailto:fabrice.bacchella@orange.fr" target="_blank">fabrice.bacchella@orange.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> Le 18 juin 2017 à 08:00, Idan Shaby <<a href="mailto:ishaby@redhat.com">ishaby@redhat.com</a>> a écrit :<br>
> If you don't need live discarding, shutdown the VM and disable the "Enable Discard" option. That will cause qemu to ignore the live UNMAP SCSI commands coming from the guest and not pass it on to the underlying storage.<br>
> Note that this makes fstrim completely redundant, as the purpose of the command is to discard unused blocks under the given path.<br>
<br>
</span>Redundant ? Useless you mean ? From my comprehension, the purpose to fstrim is to send UNMAP SCSI on batch instead of mount -o discard that send them synchronously.</blockquote></div><br></div>