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

Re: [linux-lvm] Snapshots and disk re-use



On 06/04/2011 00:43, Stuart D. Gathman wrote:
In fact, since you still have to zero an LV before removing, you might as well zero an LV when you allocate. Same overhead. Then you don't need to mess
with any of these schemes to deal with snapshots.  Did we already cover
that obvious solution?  We did discuss a utility to optimize zeroing an
already mostly zero LV.


I think you mean and lv of a virtual machine rather than snap shot, not sure how you could zero the cow. Stuart does have a good point here, there is another source of leak outside of snapshots (and probably worse), if you delete an lv the create a new one over the same PEs the data from then old lv will be there, save a few k that is zeroed at the front (to help with fs/label creation). This is worse as it is in order data that the cow from a snap is not. Geting a while fs back is very possible.

Try this test

lvcreate -L 256m -n test_lv osiris_l1_vg
yes | dd of=/dev/osiris_l1_vg/test_lv
pvdisplay --map
lvremove /dev/osiris_l1_vg/test_lv
lvcreate -L 256m -n test_lv osiris_l1_vg
pvdisplay --map
od -ha /dev/osiris_l1_vg/test_lv

James


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