Skip to content

ceph-volume: Fix error calculating lv size#38335

Closed
jmolmo wants to merge 1 commit intoceph:masterfrom
jmolmo:fix_lv_size
Closed

ceph-volume: Fix error calculating lv size#38335
jmolmo wants to merge 1 commit intoceph:masterfrom
jmolmo:fix_lv_size

Conversation

@jmolmo
Copy link
Copy Markdown
Member

@jmolmo jmolmo commented Nov 30, 2020

fixes: https://tracker.ceph.com/issues/48383

Signed-off-by: Juan Miguel Olmo Martínez jolmomar@redhat.com

  • [ x ] References tracker ticket

fixes: https://tracker.ceph.com/issues/48383

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
@jmolmo jmolmo requested review from a team and jan--f November 30, 2020 11:06
@jmolmo jmolmo requested a review from a team as a code owner November 30, 2020 11:06
@jmolmo
Copy link
Copy Markdown
Member Author

jmolmo commented Nov 30, 2020

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:

> /bin/podman:stderr Running command: /usr/sbin/lvcreate --yes -l 57234 -n osd-block-124ea5a7-cfe6-4db6-bf84-c0b32fea5588 ceph-ebbcc39c-ce15-4e0f-95cc-2308ec8fca42
> /bin/podman:stderr  stderr: Volume group "ceph-ebbcc39c-ce15-4e0f-95cc-2308ec8fca42" has insufficient free space (57233 extents): 57234 required.

@rishabh-d-dave
Copy link
Copy Markdown
Contributor

@jan--f Would be good to a have test for this, right?

@rishabh-d-dave
Copy link
Copy Markdown
Contributor

@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 jan--f added the DNM label Dec 8, 2020
Copy link
Copy Markdown
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@prazumovsky
Copy link
Copy Markdown

any updates on this issue?

@jan--f
Copy link
Copy Markdown
Contributor

jan--f commented Jan 21, 2021

any updates on this issue?

Yes the preferred fix is in #38687. Waiting on a review.

@jan--f
Copy link
Copy Markdown
Contributor

jan--f commented Jan 21, 2021

Superseeded by #38687

@jan--f jan--f closed this Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants