Hi,

Removing a logical volume (LV) doesn't free the space from the underlying
storage, i.e the underlying thinly provisioned LUN is not shrunk.
When you remove a LV from your virtual group (VG), your VG still uses the
same blocks from the underlying storage perspective.
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.
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.


Regards,
Idan

On Wed, Jan 3, 2018 at 1:41 PM, pengyixiang <yxpengi...@163.com> wrote:

> Hello!
>    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"
> and "deleteVolumes", I see "This feature is about freeing (discarding)
> the whole disk space right before removing it." in [2], I don't know
> what the different between freeing and removing? May call deleteVolumes->
> lvm.removeLVs thats enough to delete the lvs of vm and others vm
> can reuse it's space?
>
>
> [1] https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd3427d3d328
> 61d77f01a7/lib/vdsm/storage/blockSD.py#L705
> [2] https://www.ovirt.org/develop/release-management/
> features/storage/discard-after-delete/#what-could-be-improved
>
>
>
>
>
> At 2018-01-03 14:29:29, "Idan Shaby" <ish...@redhat.com> wrote:
>
> Hi,
>
> 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.
>
> 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.
> For more information about Discard After Delete, please refer to the
> feature page [1].
>
> 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.
> For more information about Wipe After Delete, please refer to the
> administrator guide [2].
>
> If you have any further questions, please don't hesitate to ask.
>
> Regards,
> Idan
>
> [1] https://www.ovirt.org/develop/release-management/features/
> storage/discard-after-delete/
> [2] https://www.ovirt.org/documentation/admin-guide/
> chap-Virtual_Machine_Disks/#settings-to-wipe-virtual-disks-after-deletion
>
> On Wed, Jan 3, 2018 at 4:33 AM, pengyixiang <yxpengi...@163.com> wrote:
>
>> hello, everyone!
>>     when Image.delete called in vdsm, we need a param "discart" in [1],
>> then I find is just supported by block and "/sbin/blkdiscard" called in
>> last in [2], but
>> I don't know why we need to discard the block devices rather than
>> directly use "rm -f" ? and what time we need set "discart = TRUE" ?
>>     And what time we should set "postZero=TRUE" ?
>>
>>
>> [1]  https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd
>> 3427d3d32861d77f01a7/lib/vdsm/API.py#L841
>> [2]https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd34
>> 27d3d32861d77f01a7/lib/vdsm/storage/blockSD.py#L714
>>
>>
>>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/devel
>>
>
>
>
>
>
_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Reply via email to