-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volume: allow extend cow preallocated #379
volume: allow extend cow preallocated #379
Conversation
Add test to extend volume size. Preallocated volumes (both raw and cow) should extend to prevent VMs from pausing when reaching the volume truesize limit. Test is used to reproduce the issue in https://bugzilla.redhat.com/2170689 Signed-off-by: Albert Esteve <aesteve@redhat.com>
603699c
to
1f1f7bb
Compare
/ost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but I'd also rename _extendSizeRaw then
Currently we assume in the code that cow volumes do not need to be extended in any case. However, all preallocated volumes, both cow and raw, should be extended when requested. Otherwise, cow preallocated volumes have bigger capacity than their truesize. Thus, when the size of the disk reaches the truesize, the VM will pause, which is an undesired effect. To avoid this, we relax this assumption so that only cow sparse volumes are skipped on extend calls. Bug-Url: https://bugzilla.redhat.com/2170689 Signed-off-by: Albert Esteve <aesteve@redhat.com>
Rename '_extendSizeRaw' to just '_extendSize', as COW preallocated volumes can also reach this call to extend LVs. Signed-off-by: Albert Esteve <aesteve@redhat.com>
1f1f7bb
to
c9e61e4
Compare
Verified in my local setup doing:
|
c9e61e4
to
c05e9b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better now, thanks!
Add a test to ensure that extendSize is correctly skipped for cow sparse volumes. Signed-off-by: Albert Esteve <aesteve@redhat.com>
c05e9b4
to
b3c98eb
Compare
/ost |
This is wrong - extending cow disk must increase the virtual size, but
Sound correct. But I don't see how this issue can cause a VM to pause. If the virtual size did not |
@nirs the part you comnented on was supposed to be: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks safe, but it cannot fix an issue of vm pausing, since this cannot be caused by smaller virtual size.
The fix also does not affect the code changing the virtual size of
cow volume, it only affects the code changing the actual lv.
But this is fine, the disk will be extended as needed while writing. |
Looking at the code path changed, this affects HSM.extendVolumeSize, which extend the Bad API on vdsm side, instead of one API that does the right thing we have 2 APIs So the fix is just a nice to have allocation fix, keep preallocated volumes If this fix an issue of pausing vms, it means thin provisioning code is broken Testing extension of preallocated volumes without this fix will tell if more work is |
right, without this fix our tools show customers that something is wrong in their storage domains after extending preallocated qcow disks on block storage, as they expect virtual size == actual size for preallocated disks |
OK, so the issue is not pausing vms, but incorrect allocation reported by the tools. |
Currently we assume in the code that cow
volumes do not need to be extended in any case.
However, all preallocated volumes, both
cow and raw, should be extended when requested.
Otherwise, cow preallocated volumes have bigger
capacity than their truesize. Thus, when the size
of the disk reaches the truesize, the VM will
pause, which is an undesired effect.
To avoid this, we relax this assumption so that
only cow sparse volumes are skipped on extend calls.
Bug-Url: https://bugzilla.redhat.com/2170689
Signed-off-by: Albert Esteve aesteve@redhat.com