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

support typed restriction of lv creation to specific pvs #422

Open
sielicki opened this issue Oct 14, 2023 · 3 comments
Open

support typed restriction of lv creation to specific pvs #422

sielicki opened this issue Oct 14, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@sielicki
Copy link

sielicki commented Oct 14, 2023

lvcreate accepts a trailing argument [PhysicalVolumePath[:PE[-PE]]...] which can be used to restrict logical volume creation to specific physical volume(s).

This is the only really sensible way to create tiered storage for eg: cache creation, #421, but it can be useful in other complex scenarios.

Nothing prevents this from being used today via extraArguments, but it would drop types, ie: would rely on just using the same device string in extraArguments to pv creation as one used for the lv.

@iFreilicht
Copy link
Contributor

I don't quite understand what the final API is supposed to look like. Could you show an example of what you would like to add to a configuration?

Also, are you sure this is possible right now? extraArgs does exist on lvm_vg and is passed to lvmcreate, but lvm_pv does not have an option like that. Would adding this already be sufficient?

@iFreilicht iFreilicht added the enhancement New feature or request label Oct 14, 2024
@TheSlothyBR
Copy link

I don't quite understand what the final API is supposed to look like. Could you show an example of what you would like to add to a configuration?

Also, are you sure this is possible right now? extraArgs does exist on lvm_vg and is passed to lvmcreate, but lvm_pv does not have an option like that. Would adding this already be sufficient?

Based on the lvm documentation, the very last argument passed to the command "lvcreate" should be the physical volume(s) it will be created from. Maybe it can be done by adding something like ${lib.optionalString } right after this line, using the values passed to here to generate an enum for the option?

@sielicki
Copy link
Author

sielicki commented Dec 21, 2024

After running into performance issues with any complex layout on the system where I originally wanted this, I have no personal interest in this use-case anymore and would leave it up to others to comment on what schema would make sense.

If this is a rare-enough option that it shouldn't be in the spec in the first place, might just be worth commenting with an example of how to use hooks to accomplish this and closing.

Thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants