[PATCH 3/3] Fix calculation of md array spare count.

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

 



Resolves: rhbz#678028
Resolves: rhbz#676519
---
 pyanaconda/storage/devices.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index d1e767f..95a61e1 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -2756,9 +2756,10 @@ class MDRaidArrayDevice(StorageDevice):
     def _getSpares(self):
         spares = 0
         if self.memberDevices is not None:
-            if self.totalDevices is not None:
+            if self.totalDevices is not None and \
+               self.totalDevices > self.memberDevices:
                 spares = self.totalDevices - self.memberDevices
-            else:
+            elif self.totalDevices is None:
                 spares = self.memberDevices
                 self._totalDevices = self.memberDevices
         return spares
-- 
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