[PATCH 7/8] Fix check for whether new lv size will fit in vg's free space.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vgSpacedUsed aligns the lv size so we don't get tripped up by
partially utilized PE.
---
 pyanaconda/storage/devices.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 8c78aad..d908b76 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -2492,11 +2492,11 @@ class LVMLogicalVolumeDevice(DMDevice):
     def _setSize(self, size):
         size = self.vg.align(numeric_type(size))
         log.debug("trying to set lv %s size to %dMB" % (self.name, size))
-        if size <= (self.vg.freeSpace + self._size):
+        if size <= self.vg.freeSpace + self.vgSpaceUsed:
             self._size = size
             self.targetSize = size
         else:
-            log.debug("failed to set size: %dMB short" % (size - (self.vg.freeSpace + self._size),))
+            log.debug("failed to set size: %dMB short" % (size - (self.vg.freeSpace + self.vgSpaceUsed),))
             raise ValueError("not enough free space in volume group")
 
     size = property(StorageDevice._getSize, _setSize)
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux