[master 5/7] Reserve space for LVM cache(s) when growing LVM requests
vpodzime
installerbot-noreply at redhat.com
Fri Jul 31 11:33:57 UTC 2015
From: Vratislav Podzimek <vpodzime at redhat.com>
LVM cache takes space from the VG, but it is not included in the cached LV's
size.
---
blivet/partitioning.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index 69e79e5..ea13004 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -1396,6 +1396,10 @@ def addRequest(self, req):
if max_raid_disks > 1:
self.pool -= 5 * max_raid_disks
+ if req.device.cached:
+ # cached LV -> reserve space for the cache
+ self.pool -= int(self.vg.align(req.device.cache.size, roundup=True) / self.vg.peSize)
+
super(VGChunk, self).addRequest(req)
def lengthToSize(self, length):
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/a3c309b42b3fbbea3f4d1921ed945d71ae1aa2c4
More information about the anaconda-patches
mailing list