|
|
ff0790 |
From 2970b30815943edaa1575095cbf434fa9fc288a8 Mon Sep 17 00:00:00 2001
|
|
|
ff0790 |
From: David Lehman <dlehman@redhat.com>
|
|
|
ff0790 |
Date: Wed, 11 Mar 2020 12:58:50 -0400
|
|
|
ff0790 |
Subject: [PATCH 2/2] Allow for reserved vg space and a growable thin pool.
|
|
|
ff0790 |
(#1783946)
|
|
|
ff0790 |
|
|
|
ff0790 |
---
|
|
|
ff0790 |
blivet/devices/lvm.py | 9 +++++----
|
|
|
ff0790 |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
ff0790 |
|
|
|
ff0790 |
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
|
|
|
ff0790 |
index 3b33104d..ed25fd1a 100644
|
|
|
ff0790 |
--- a/blivet/devices/lvm.py
|
|
|
ff0790 |
+++ b/blivet/devices/lvm.py
|
|
|
ff0790 |
@@ -417,10 +417,11 @@ class LVMVolumeGroupDevice(ContainerDevice):
|
|
|
ff0790 |
reserved = self._reserved_percent * Decimal('0.01') * self.size
|
|
|
ff0790 |
elif self._reserved_space > Size(0):
|
|
|
ff0790 |
reserved = self._reserved_space
|
|
|
ff0790 |
- elif self._thpool_reserve and any(lv.is_thin_pool for lv in self._lvs):
|
|
|
ff0790 |
- reserved = min(max(self._thpool_reserve.percent * Decimal(0.01) * self.size,
|
|
|
ff0790 |
- self._thpool_reserve.min),
|
|
|
ff0790 |
- self._thpool_reserve.max)
|
|
|
ff0790 |
+
|
|
|
ff0790 |
+ if self._thpool_reserve and any(lv.is_thin_pool for lv in self._lvs):
|
|
|
ff0790 |
+ reserved += min(max(self._thpool_reserve.percent * Decimal(0.01) * self.size,
|
|
|
ff0790 |
+ self._thpool_reserve.min),
|
|
|
ff0790 |
+ self._thpool_reserve.max)
|
|
|
ff0790 |
|
|
|
ff0790 |
# reserve space for the pmspare LV LVM creates behind our back
|
|
|
ff0790 |
reserved += self.pmspare_size
|
|
|
ff0790 |
--
|
|
|
ff0790 |
2.25.4
|
|
|
ff0790 |
|