-
Notifications
You must be signed in to change notification settings - Fork 85
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
LVM cache creation #190
LVM cache creation #190
Conversation
d822463
to
6f1d19b
Compare
Fixed a pylint warning. |
Instead of passing cache parameters as separate numbers, strings, etc. we may better put them into objects that hold them as a single logical unit.
These are the basic building blocks for LVM cache creation as all high-level calls end up doing these things.
In order to minimize the risk of non-cached LVs taking space on fast PVs that should be used by caches.
LVM cache takes space from the VG, but it is not included in the cached LV's size.
The new LV's parent may be a VG or a thin pool depending on the type of the new LV. Let's call this object 'parent' instead of 'vg' which is way less confusing.
The requested size for the LV's non-cache part may be bigger than the free space on the slow PVs while it can safely fit in the set of slow and fast PVs together with the cache. An example of this is when a kickstart is used with two PVs in a VG and LV(s) with --cachesize and --grow. In that case the LV is grown to the maximum size filling up the VG together with the cache and other LVs (and their caches).
6f1d19b
to
5512c61
Compare
New version using PV devices instead of just their names. |
Looks good to me. |
Some unit tests to go along with this would be really nice. |
I'll definitely implement some once this gets merged and has some "final" state. I first wanted to catch up with rhel7-branch and its support for LVM cache. Now I can work on both unit tests and kickstart tests for anaconda. |
Commits that add support for creation of cached LVs plus two minor changes that make things a bit nicer. Please note that I'm intentionally leaving the changes in the last commit as a standalone commit as it needs some attention.