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

LVM cache creation #190

Merged

Conversation

vpodzime
Copy link
Contributor

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.

@vpodzime
Copy link
Contributor Author

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).
@vpodzime
Copy link
Contributor Author

vpodzime commented Aug 4, 2015

New version using PV devices instead of just their names.

@vojtechtrefny
Copy link
Member

Looks good to me.

@dwlehman
Copy link
Contributor

dwlehman commented Aug 5, 2015

Some unit tests to go along with this would be really nice.

@vpodzime
Copy link
Contributor Author

vpodzime commented Aug 6, 2015

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.

dwlehman added a commit that referenced this pull request Aug 6, 2015
@dwlehman dwlehman merged commit bf04fa1 into storaged-project:master Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants