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

Fix checking for segment type for cache pools #1192

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blivet/devices/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def __init__(self, name, parents=None, size=None, uuid=None, seg_type=None,
# we reserve space for it
self._metadata_size = self.vg.pe_size
self._size -= self._metadata_size
elif self.seg_type in ("thin-pool", "cache_pool"):
elif self.seg_type in ("thin-pool", "cache-pool"):
# LVMThinPoolMixin and LVMCachePoolMixin set self._metadata_size on their own
if not self.exists and not from_lvs and not grow:
# a thin pool we are not going to grow -> lets calculate metadata
Expand Down Expand Up @@ -2311,7 +2311,7 @@ def autoset_md_size(self, enforced=False):

old_md_size = self._metadata_size
if self._metadata_size == 0 or enforced:
self._metadata_size = blockdev.lvm.cache_get_default_md_size(self._size)
self._metadata_size = Size(blockdev.lvm.cache_get_default_md_size(self._size))
log.debug("Using recommended metadata size: %s", self._metadata_size)

self._metadata_size = self.vg.align(self._metadata_size, roundup=True)
Expand Down
Loading