[master 7/7] Use slow as well as fast PVs for cached LV's non-cache part

vpodzime installerbot-noreply at redhat.com
Fri Jul 31 11:33:59 UTC 2015


From: Vratislav Podzimek <vpodzime at redhat.com>

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).
---
 blivet/devices/lvm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index 5d72b1a..39a12e9 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -769,8 +769,11 @@ def _create(self):
             data_size = self.cache.size - md_size
 
             # VG name, LV name, data size, cache size, metadata size, mode, flags, slow PVs, fast PVs
+            # XXX: we need to pass slow_pvs+fast_pvs as slow PVs because parts
+            # of the fast PVs may be required for allocation of the LV (it may
+            # span over the slow PVs and parts of fast PVs)
             blockdev.lvm.cache_create_cached_lv(self.vg.name, self._name, self.size, data_size, md_size,
-                                                mode, 0, slow_pvs, fast_pvs)
+                                                mode, 0, slow_pvs+fast_pvs, fast_pvs)
 
     def _preDestroy(self):
         StorageDevice._preDestroy(self)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/d8224631ccaba949c5eae7ca372c346ef2861fc5


More information about the anaconda-patches mailing list