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

Separate actions for LVM cache attach/detach #1003

Open
vojtechtrefny opened this issue Dec 22, 2021 · 0 comments
Open

Separate actions for LVM cache attach/detach #1003

vojtechtrefny opened this issue Dec 22, 2021 · 0 comments

Comments

@vojtechtrefny
Copy link
Member

Currently both LVMLogicalVolumeDevice.attach_cache and LVMCache.detach are simple functions that immediately call the libblockdev functions to attach or detach the cache volume. This isn't currently a problem because we are not supporting creating cache volumes and only way to create a cached LV is to do create a new LV with a cache in a one step using cache_request. I'm currently working on support for creating cache pools and attaching them to an existing LV (this will be used in the storage role, see linux-system-roles/storage#235 and in the future could be useful for blivet-gui too). In this case having an action would useful -- without an action it's not possible to create the cache pool and attach it to an existing LV in one step, it would be necessary to call do_it and then attach_cache with the newly created cache pool as an argument.

This would of course require addition of two new actions for attaching and detaching the cache making the actions API potentially more complicated.

Strictly speaking we don't need the actions for the storage role -- it uses actions internally, but executes them all immediately for every task so manually running attach_cache for this case wouldn't be a huge issue.

Thoughts @dwlehman @japokorn

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

No branches or pull requests

1 participant