[ovirt-devel] why we need "postZero" and discard the block device in deleteVolumes(class Image) in vdsm?

pengyixiang yxpengi386 at 163.com
Wed Jan 3 11:41:46 UTC 2018


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/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/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" <ishaby at 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 <yxpengi386 at 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/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/lib/vdsm/API.py#L841
[2]https://github.com/oVirt/vdsm/blob/2b98daffb2c2dec1bbbd3427d3d32861d77f01a7/lib/vdsm/storage/blockSD.py#L714




 


_______________________________________________
Devel mailing list
Devel at ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20180103/0e5ecdc3/attachment-0001.html>


More information about the Devel mailing list