Re: [PATCH 2/2] storage: Disallow vol_wipe for sparse logical volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/17/2014 12:10 PM, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1091866
> 
> Add a new boolean 'sparse'.  This will be used by the logical backend
> storage driver to determine whether the target volume is sparse or not
> (also known by a snapshot or thin logical volume). Although setting sparse
> to true at creation could be seen as duplicitous to setting during
> virStorageBackendLogicalMakeVol() in case there are ever other code paths
> between Create and FindLVs that need to know about the volume be sparse.
> 
> Use the 'sparse' in a new virStorageBackendLogicalVolWipe() to decide whether
> to attempt to wipe the logical volume or not. For now, I have found no
> means to wipe the volume without writing to it. Writing to the sparse
> volume causes it to be filled. A sparse logical volume is not complely

s/complely/completely/

> writeable as there exists metadata which if overwritten will cause the
> sparse lv to go INACTIVE which means pool-refresh will not find it.
> Access to whatever lvm uses to manage data blocks is not provided by
> any API I could find.
> 

I wonder if lvm developers could point us to an alternative; maybe even
lvreduce (shrink the allocated size) followed by lvresize (regrow it,
but the new growth starts life empty) might behave semantically like a
wipe.  But yeah, we don't need to solve that today.

> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/storage/storage_backend_logical.c | 39 ++++++++++++++++++++++++++++++++++-
>  src/util/virstoragefile.h             |  1 +
>  2 files changed, 39 insertions(+), 1 deletion(-)
> 

ACK

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]