Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice
On Fri, Jul 15, 2016 at 02:51:21PM +0300, Olga Krishtal wrote: On 15/07/16 11:37, Martin Kletzander wrote: On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected algorithm first (without deletion), then reinitialized to make sure you can delete it via libvirt later. You're right, I missed that what I was describing only happened with VIR_STORAGE_VOL_WIPE_ALG_ZERO. Anyway since the description for vol-wipe is: "Ensure data previously on a volume is not accessible to future reads" wiping algorithm does not really make sense for file-based storage. That's kind of the whole point of this series. Actually, virStorageBackendVolWipePloop only deletes root.hds and DiscDescriptor.xml. So the data on block device can still be accessible. To prevent this we used little path/to/volume manipulation and wiped root.hds firstly and only then called virStorageBackendVolWipePloop. It is incorrect to call only this function for ploop. We could get rid of the reinitialization if we make sure libvirt can operate on the volume (after wiping, pretty much only delete makes sense), but removing the actual wiping is wrong. Oh, I totally misunderstood how the volume is stored then. Thanks for the info, I'll try to repost this in order for it not to just fix this but to suit, hopefully, most people as well. Have a nice day, Martin signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice
On 15/07/16 11:37, Martin Kletzander wrote: On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected algorithm first (without deletion), then reinitialized to make sure you can delete it via libvirt later. You're right, I missed that what I was describing only happened with VIR_STORAGE_VOL_WIPE_ALG_ZERO. Anyway since the description for vol-wipe is: "Ensure data previously on a volume is not accessible to future reads" wiping algorithm does not really make sense for file-based storage. That's kind of the whole point of this series. Actually, virStorageBackendVolWipePloop only deletes root.hds and DiscDescriptor.xml. So the data on block device can still be accessible. To prevent this we used little path/to/volume manipulation and wiped root.hds firstly and only then called virStorageBackendVolWipePloop. It is incorrect to call only this function for ploop. We could get rid of the reinitialization if we make sure libvirt can operate on the volume (after wiping, pretty much only delete makes sense), but removing the actual wiping is wrong. Jan Since we'll hopefully add support for other formats as well, split the function with a switch into which we can cleanly add formats in the future. Signed-off-by: Martin Kletzander--- src/storage/storage_backend.c | 49 --- 1 file changed, 27 insertions(+), 22 deletions(-) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice
On Fri, Jul 15, 2016 at 09:41:11AM +0200, Ján Tomko wrote: On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected algorithm first (without deletion), then reinitialized to make sure you can delete it via libvirt later. You're right, I missed that what I was describing only happened with VIR_STORAGE_VOL_WIPE_ALG_ZERO. Anyway since the description for vol-wipe is: "Ensure data previously on a volume is not accessible to future reads" wiping algorithm does not really make sense for file-based storage. That's kind of the whole point of this series. We could get rid of the reinitialization if we make sure libvirt can operate on the volume (after wiping, pretty much only delete makes sense), but removing the actual wiping is wrong. Jan Since we'll hopefully add support for other formats as well, split the function with a switch into which we can cleanly add formats in the future. Signed-off-by: Martin Kletzander--- src/storage/storage_backend.c | 49 --- 1 file changed, 27 insertions(+), 22 deletions(-) signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] storage: Don't delete Ploop volumes twice
On Thu, Jul 14, 2016 at 02:27:40PM +0200, Martin Kletzander wrote: When reinitializing Ploop volumes we also went through the rutine of the normal wipe, effectively removing the root.hds file twice. The file was wiped with the selected algorithm first (without deletion), then reinitialized to make sure you can delete it via libvirt later. We could get rid of the reinitialization if we make sure libvirt can operate on the volume (after wiping, pretty much only delete makes sense), but removing the actual wiping is wrong. Jan Since we'll hopefully add support for other formats as well, split the function with a switch into which we can cleanly add formats in the future. Signed-off-by: Martin Kletzander--- src/storage/storage_backend.c | 49 --- 1 file changed, 27 insertions(+), 22 deletions(-) -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list