Skip to content
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

Trim volume size as needed to fit in pool free space #199

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

dwlehman
Copy link
Collaborator

I've included the test from #189 since it is intended to verify this change.

I am open to a discussion of whether we should expose MAX_TRIM_PERCENT in the role defaults. I'm also open to discussion of what the best default value is. I would definitely be open to reducing it to 2-4% as that's more in line with my intended application of this.

@dwlehman dwlehman force-pushed the trim-volume-size branch 2 times, most recently from 9b132aa to 9069389 Compare February 15, 2021 19:26
@dwlehman
Copy link
Collaborator Author

This should resolve #13

@dwlehman
Copy link
Collaborator Author

[citest bad]

@richm
Copy link
Contributor

richm commented Feb 18, 2021

[citest bad]
staging now has the fix so that tests from other PRs won't be used

@richm
Copy link
Contributor

richm commented Feb 18, 2021

[citest bad]

@nhosoi
Copy link
Contributor

nhosoi commented Feb 19, 2021

[citest bad]
staging now has the fix so that tests from other PRs won't be used

We could verify that there is no more extra files from previous PRs, e.g., with rhel-x/ansible-2.9 (staging) — linux-system-roles-staging-141-jbrp5@2021-02-19 07:06:56.290667. It ran after the new test-harness was deployed as well as after a pr with extra test (#181).

Copy link
Collaborator

@japokorn japokorn left a comment

Choose a reason for hiding this comment

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

One comment, otherwise it looks good to me.

tests/tests_lvm_auto_size_cap.yml Show resolved Hide resolved
dwlehman and others added 3 commits February 22, 2021 17:41
This adds a mechanism for trimming requested volume sizes so that
they fit in their pool. The intention is to accommodate small
shortages arising from metadata space usage, eg: creating a lvm
pool on an unpartitioned 10GiB drive and trying to create a single
100GiB volume in that pool. There is no reason a user of this role
should have to learn about LVM's metadata usage.

The maximum reduction of the volume size is 10% of the requested
size.
Playbook will fail when lv size is equal to vg size

Signed-off-by: Changhui Zhong <czhong@redhat.com>
@dwlehman
Copy link
Collaborator Author

Latest revision added changed_when: false to two plays(?) in the tests and a little blurb to the README about the size trimming.

@dwlehman dwlehman merged commit 9581348 into linux-system-roles:master Mar 12, 2021
@dwlehman dwlehman deleted the trim-volume-size branch March 12, 2021 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants