-
Notifications
You must be signed in to change notification settings - Fork 59
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
Trim volume size as needed to fit in pool free space #199
Conversation
9b132aa
to
9069389
Compare
This should resolve #13 |
[citest bad] |
d95ecf6
to
dddf749
Compare
[citest bad] |
[citest bad] |
We could verify that there is no more extra files from previous PRs, e.g., with |
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.
One comment, otherwise it looks good to me.
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 <[email protected]>
dddf749
to
50a3801
Compare
Latest revision added |
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.