[linux-lvm] Snapshots and disk re-use

Jonathan Tripathy jonnyt at abpni.co.uk
Wed Apr 6 00:47:05 UTC 2011



On 06/04/2011 01:38, Stuart D. Gathman wrote:
> On Wed, 6 Apr 2011, Jonathan Tripathy wrote:
>
>> pvcreate /dev/hdb7
>> vgextend /dev/hdb7
>>
>> Then, every time I create a new customer LV, I would do:
>>
>> lvcreate -nNewCustomerLV -L20G vg0 /dev/md3
>>
>> Then, every time I wanted to create a snapshot:
>>
>> lvcreate -L20G -s -n data_snap /dev/vg0/NewCustomerLV /dev/hdb7
>>
>> Is that correct? No Leakage? And no zeroing needed?
>
> Correct.  Except vgextend needs to specify a VG.  And you still need 
> to zero a
> customer LV before removing it.  The PV reserved for snapshots 
> approach only
> avoids the need to zero snapshots.
Excellent! Cake for all! :)
>
> I wonder if there is an elegant way to automate things like this via
> "allocation policies" or similar in the metadata. 
Indeed, there does seem to be some scope here for a code feature request 
as this does seem like an aweful lot of work for something that could 
very easily be overlooked. Every book or article I've read about hosting 
seems to never mention anything about zeroing....




More information about the linux-lvm mailing list