[PATCH 2/8] Drop requested container disks that don't have enough space. (#873293)

David Lehman dlehman at redhat.com
Thu Nov 29 17:19:26 UTC 2012


---
 pyanaconda/storage/__init__.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 9685ec0..e480739 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1867,6 +1867,11 @@ class Storage(object):
             # new container, so use the factory's disk set
             add_disks = factory.disks
 
+        # drop any new disks that don't have free space
+        min_free = min(500, factory.size)
+        add_disks = [d for d in add_disks if d.partitioned and
+                                             d.format.free >= min_free]
+
         base_size = max(1, getFormat(factory.member_format).minSize)
 
         # XXX TODO: multiple member devices per disk
-- 
1.7.7.6



More information about the anaconda-patches mailing list