<div dir="ltr"><div><div><div>Hi,<br><br></div>Removing a logical volume (LV) doesn&#39;t free the space from the underlying storage, i.e the underlying thinly provisioned LUN is not shrunk.<br></div>When you remove a LV from your virtual group (VG), your VG still uses the same blocks from the underlying storage perspective.</div><div>The only thing that is changed when you remove a LV is that from lvm&#39;s perspective, your VG  has some more free space now so you can create more LVs on it.</div><div>When you call to blkdiscard before removing the LV, you &quot;tell&quot; the storage array that you don&#39;t need these blocks anymore, and therefore it can use them to provision new LUNs or extend existing ones.<br></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 Wed, Jan 3, 2018 at 1:41 PM, pengyixiang <span dir="ltr">&lt;<a href="mailto:yxpengi386@163.com" target="_blank">yxpengi386@163.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello!</div><div>   Thaks for your reply ,  I read these guides and make clear some, but there&#39;s one point I don&#39;t understand. In [1], purgeImage call &quot;blkdiscard&quot; </div><div>and &quot;deleteVolumes&quot;, I see &quot;<span style="color:rgb(51,51,51);font-family:&quot;Source Sans Pro&quot;,&quot;Open Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;font-size:16px">This feature is about freeing (discarding) the whole disk space right before removing it.</span>&quot; in [2], I don&#39;t know </div><div>what the different between freeing and removing? May call deleteVolumes-&gt;<span style="font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap;background-color:rgb(228,228,255)">lvm</span><span style="font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap">.removeLVs </span>thats enough to delete the lvs of vm and others vm </div><div>can reuse it&#39;s space?</div><div><br></div><div><br></div><div>[1] <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><a href="https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/lib/vdsm/storage/blockSD.py#L705" target="_blank">https://github.com/oVirt/<wbr>vdsm/blob/<wbr>2b98daffb2c2dec1bbbd3427d3d328<wbr>61d77f01a7/lib/vdsm/storage/<wbr>blockSD.py#L705</a></span></div>[2] <a href="https://www.ovirt.org/develop/release-management/features/storage/discard-after-delete/#what-could-be-improved" target="_blank">https://www.ovirt.org/<wbr>develop/release-management/<wbr>features/storage/discard-<wbr>after-delete/#what-could-be-<wbr>improved</a><div><div class="h5"><br><br><br><br><div style="zoom:1"></div><div id="m_-4096793642520054287divNeteaseMailCard"></div><br>At 2018-01-03 14:29:29, &quot;Idan Shaby&quot; &lt;<a href="mailto:ishaby@redhat.com" target="_blank">ishaby@redhat.com</a>&gt; wrote:<br> <blockquote id="m_-4096793642520054287isReplyContent" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><div dir="ltr"><div><div>Hi,<br><br></div>The fields &quot;discard&quot; and &quot;postZero&quot; are sent to vdsm by the engine in order to implement the &quot;Discard After Delete&quot; and &quot;Wipe After Delete&quot; features.</div><div><br></div>When a storage domain is marked with Discard After Delete, a disk that is removed from that storage domain is discarded before it&#39;s removed. This way, the disk&#39;s blocks are freed from the storage array and can be used by other LUNs in the array.<br>For more information about Discard After Delete, please refer to the feature page [1].<br><br><div>When a disk (on a block storage domain) is marked with Wipe After Delete, it is wiped right before it&#39;s removed. The idea behind this is that when the disk contains sensitive data, the administrator doesn&#39;t want it to be read after it is removed. However, when we don&#39;t wipe a disk&#39;s blocks before it is removed, the data can be read by a new VM user with a disk that is created on some/all the  blocks of the old disk.</div><div>For more information about Wipe After Delete, please refer to the administrator guide [2].</div><div><br></div><div>If you have any further questions, please don&#39;t hesitate to ask.<br></div><div><br></div><div>Regards,<br></div><div class="gmail_extra"><div><div class="m_-4096793642520054287gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Idan</div><div dir="ltr"><br></div><div>[1] <a href="https://www.ovirt.org/develop/release-management/features/storage/discard-after-delete/" target="_blank">https://www.ovirt.org/develop/<wbr>release-management/features/<wbr>storage/discard-after-delete/</a></div><div>[2] <a href="https://www.ovirt.org/documentation/admin-guide/chap-Virtual_Machine_Disks/#settings-to-wipe-virtual-disks-after-deletion" target="_blank">https://www.ovirt.org/<wbr>documentation/admin-guide/<wbr>chap-Virtual_Machine_Disks/#<wbr>settings-to-wipe-virtual-<wbr>disks-after-deletion</a><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 3, 2018 at 4:33 AM, pengyixiang <span dir="ltr">&lt;<a href="mailto:yxpengi386@163.com" target="_blank">yxpengi386@163.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="line-height:1.7;color:rgb(0,0,0);font-size:14px;font-family:Arial"><div>hello, everyone!</div><div>    when Image.delete called in vdsm, we need a param &quot;discart&quot; in [1], then I find is just supported by block and <span style="color:rgb(0,128,0);font-weight:bold;font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap">&quot;/sbin/blkdiscard&quot; </span>called in last in [2], but </div><div>I don&#39;t know why we need to discard the block devices rather than directly use &quot;<span style="color:rgb(0,128,0);font-weight:bold;font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap">rm -f</span>&quot; ? and what time we need set &quot;<span style="color:rgb(0,128,0);font-weight:bold;font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap">discart = TRUE&quot; </span>?</div><div>    And what time we should set &quot;<span style="color:rgb(0,128,0);font-weight:bold;font-family:&quot;DejaVu Sans Mono&quot;;font-size:11.3pt;white-space:pre-wrap">postZero=TRUE</span>&quot; ?</div><div><br></div><div><br></div><div>[1]  <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><a href="https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/lib/vdsm/API.py#L841" target="_blank">https://github.com/oVirt/<wbr>vdsm/blob/2b98daffb2c2dec1bbbd<wbr>3427d3d32861d77f01a7/lib/vdsm/<wbr>API.py#L841</a></span></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">[2]</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"><a href="https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/lib/vdsm/storage/blockSD.py#L714" target="_blank">https://github.com/oVirt/vd<wbr>sm/blob/2b98daffb2c2dec1bbbd34<wbr>27d3d32861d77f01a7/lib/vdsm/<wbr>storage/blockSD.py#L714</a></span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap"> </span></div></div><br><br><span title="neteasefooter"><p> </p></span><br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org" target="_blank">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/devel</a><br></blockquote></div><br></div></div>
</blockquote></div></div></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div></div>