<br><br><div class="gmail_quote"><div dir="ltr">בתאריך יום א׳, 18 ביוני 2017, 9:01, מאת Idan Shaby ‏&lt;<a href="mailto:ishaby@redhat.com">ishaby@redhat.com</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Markus,<br><br></div>AFAIK, mkfs.xfs tries to discard all the blocks before formatting the device.<br>If you don&#39;t want it to do that, you can use the &quot;-K     Do not attempt to discard blocks at mkfs time&quot; option of mkfs.xfs.</div><br></div>In oVirt 4.1 we introduced the &quot;Enable Discard&quot; flag for a virtual machine&#39;s disk.<br></div><div>When enabled, qemu is configured to pass on live UNMAP SCSI commands from the guest to the underlying storage.<br></div><div>If you don&#39;t need live discarding, shutdown the VM and disable the &quot;Enable Discard&quot; 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></div><div>Note that this makes fstrim completely redundant, as the purpose of the command is to discard unused blocks under the given path.</div></div></blockquote></div><div><br></div><div>I think we need a bug for this, both fo documrnting this issue, and to investigate why discarding unused blocks allocate and zero all blocks. This behaviour is unhelpful.</div><div><br></div><div>Markus, can you check if performing the same discard from the host leads to same result?</div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br clear="all"><div><div class="m_7871977486771343462gmail_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></div></div><div dir="ltr"><div class="gmail_extra">
<br><div class="gmail_quote">On Sat, Jun 17, 2017 at 1:25 AM, Markus Stockhausen <span dir="ltr">&lt;<a href="mailto:stockhausen@collogia.de" target="_blank">stockhausen@collogia.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Arial;color:#000000;font-size:10pt">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div>
<div>Hi, </div>
<div><br>
</div>
<div>we just set up a new 4.1.2 OVirt cluster. It is a quite normal</div>
<div>HDD/XFS/NFS stack that worked quit well with 4.0 in the past. </div>
<div>Inside the VMs we use XFS too.</div>
<div><br>
</div>
<div>To our surprise we observe abysmal high IO during mkfs.xfs </div>
<div>and fstrim inside the VM. A simple example:</div>
<div><br>
</div>
<div>Step 1: Create 100G Thin disk</div>
<div>Result 1: Disk occupies ~10M on storage</div>
<div><br>
</div>
<div>Step 2: Format disk inside VM with mkfs.xfs</div>
<div>Result 2: Disk occupies 100G on storage</div>
<div><br>
</div>
<div>Changing the discard flag on the disk does not have any effect.</div>
<div><br>
</div>
<div>Am I missing something?</div>
<div><br>
</div>
<div>Best regards.</div><span class="m_7871977486771343462HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Markus</div>
</font></span></div>
</div>
</div>
</div>
</div>
<div id="m_7871977486771343462m_3975056570858151866ofmeet-extension-installed" style="display:none"></div>
</div>
</div>
</div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</blockquote></div>