Change in vdsm[ovirt-3.5]: Live Merge: Fix pre-extension calculation for chunked drives

fromani at redhat.com fromani at redhat.com
Tue Oct 27 10:05:16 UTC 2015


Francesco Romani has submitted this change and it was merged.

Change subject: Live Merge: Fix pre-extension calculation for chunked drives
......................................................................


Live Merge: Fix pre-extension calculation for chunked drives

Live merge causes data to be written from the volume that will be
removed (top volume) into its parent (base volume).  If the base volume
is on a thinly-provisioned block device (ie. COW_FORMAT) then we need to
make sure the parent's LV is large enough to accomodate growth of the
qcow2 volume as a result of the writes.  The amount of growth can be
anywhere between 0 (if all writes are replacing old data) and the
allocated size of the top volume (if all writes target unallocated
blocks in the base volume).  If the top volume is the active layer the
amount of growth required could be more due to writes from the VM that
come after this calculation is performed.

To prevent live merge failures when the base volume's LV is too small we
request an extension to accomodate the worst case scenario and increase
the base volume's LV by the size of the top volume's LV plus one
additional chunk.  The LV will never be increased beyond the actual
capacity of the VM disk.

The old code extended the base volume's LV to the size of the top
volume's LV which does not cover all the possible scenarios.

After live merge completes, the base volume's LV may be larger than is
necessary.  This will not impact the VM but a manual cleanup step could
be used to reclaim some storage space.

Change-Id: I959608dc2f5a71afca605610267478e8a16e2c4b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1272077
Signed-off-by: Adam Litke <alitke at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/47589
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Continuous-Integration: Francesco Romani <fromani at redhat.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 17 insertions(+), 4 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Adam Litke: Verified
  Allon Mureinik: Looks good to me, but someone else must approve
  Francesco Romani: Looks good to me, approved; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/47589
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I959608dc2f5a71afca605610267478e8a16e2c4b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list