<div dir="ltr"><div><div><div>Hi,<br><br></div>Removing a logical volume (LV) doesn'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'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 "tell" the storage array that you don'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"><<a href="mailto:yxpengi386@163.com" target="_blank">yxpengi386@163.com</a>></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's one point I don't understand. In [1], purgeImage call "blkdiscard" </div><div>and "deleteVolumes", I see "<span style="color:rgb(51,51,51);font-family:"Source Sans Pro","Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px">This feature is about freeing (discarding) the whole disk space right before removing it.</span>" in [2], I don't know </div><div>what the different between freeing and removing? May call deleteVolumes-><span style="font-family:"DejaVu Sans Mono";font-size:11.3pt;white-space:pre-wrap;background-color:rgb(228,228,255)">lvm</span><span style="font-family:"DejaVu Sans Mono";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's space?</div><div><br></div><div><br></div><div>[1] <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",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, "Idan Shaby" <<a href="mailto:ishaby@redhat.com" target="_blank">ishaby@redhat.com</a>> 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 "discard" and "postZero" are sent to vdsm by the engine in order to implement the "Discard After Delete" and "Wipe After Delete" 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's removed. This way, the disk'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's removed. The idea behind this is that when the disk contains sensitive data, the administrator doesn't want it to be read after it is removed. However, when we don't wipe a disk'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'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"><<a href="mailto:yxpengi386@163.com" target="_blank">yxpengi386@163.com</a>></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 "discart" in [1], then I find is just supported by block and <span style="color:rgb(0,128,0);font-weight:bold;font-family:"DejaVu Sans Mono";font-size:11.3pt;white-space:pre-wrap">"/sbin/blkdiscard" </span>called in last in [2], but </div><div>I don't know why we need to discard the block devices rather than directly use "<span style="color:rgb(0,128,0);font-weight:bold;font-family:"DejaVu Sans Mono";font-size:11.3pt;white-space:pre-wrap">rm -f</span>" ? and what time we need set "<span style="color:rgb(0,128,0);font-weight:bold;font-family:"DejaVu Sans Mono";font-size:11.3pt;white-space:pre-wrap">discart = TRUE" </span>?</div><div> And what time we should set "<span style="color:rgb(0,128,0);font-weight:bold;font-family:"DejaVu Sans Mono";font-size:11.3pt;white-space:pre-wrap">postZero=TRUE</span>" ?</div><div><br></div><div><br></div><div>[1] <span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",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,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;white-space:pre-wrap">[2]</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",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,"Liberation Mono",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>