ceph-volume: Fix error calculating lv size#38335
Conversation
fixes: https://tracker.ceph.com/issues/48383 Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
|
After creating a new logical volume providing a certain size, the "extens" of the logical volume are calculated in base to the size of the volume group just created. Depending of the lv size, and the vg extend size .... the result can be bigger (1 Mb) than the real space available ... then we are getting the error: |
|
@jan--f Would be good to a have test for this, right? |
|
@jan--f Since the tracker ticket is marked as duplicate should this PR be marked as DNM until there is a PR for 47758? |
jan--f
left a comment
There was a problem hiding this comment.
Sorry I don't think this is the right approach. Tbh I'm not even sure why this works.
I think the bug you reported happens, if LVM for some reason aligns a PV not at 1MB but some other offset. We need to factor this offset into our size calculation. I'll push a PR shortly.
I left a request for additional debug data in https://tracker.ceph.com/issues/47758?issue_count=70&issue_position=7&next_issue_id=47966&prev_issue_id=47831#note-12. This would quickly confirm or reject my approach.
|
any updates on this issue? |
Yes the preferred fix is in #38687. Waiting on a review. |
|
Superseeded by #38687 |
fixes: https://tracker.ceph.com/issues/48383
Signed-off-by: Juan Miguel Olmo Martínez jolmomar@redhat.com