[PATCH] Add a size attribute to mdraid arrays.

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

 



It doesn't account for metadata size, but that's supposed to be
something like 128K, so I'm hoping to get away without it.
---
 storage/devices.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 713449b..2ae643c 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1879,6 +1879,14 @@ class MDRaidArrayDevice(StorageDevice):
         #self.probe()
 
     @property
+    def size(self):
+        size = None
+        for device in self.devices:
+            if size is None or device.size < size:
+                size = device.size
+        return size
+
+    @property
     def mdadmConfEntry(self):
         """ This array's mdadm.conf entry. """
         if not self.level or self.memberDevices is None or not self.uuid:
-- 
1.6.0.6

_______________________________________________
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