summaryrefslogtreecommitdiffstats
path: root/pyanaconda
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2012-07-02 12:42:32 -0500
committerDavid Lehman <dlehman@redhat.com>2012-07-10 15:08:11 -0500
commit4bf9257e1ab8211c72fc5ac23a6d44e3a62da8a5 (patch)
treeb23c89b195379f0710fed67c8ee38c80351896ab /pyanaconda
parentbb62d32c3bef032feeffb442a5dce155545f1ed9 (diff)
downloadanaconda-4bf9257e1ab8211c72fc5ac23a6d44e3a62da8a5.tar.gz
anaconda-4bf9257e1ab8211c72fc5ac23a6d44e3a62da8a5.tar.xz
anaconda-4bf9257e1ab8211c72fc5ac23a6d44e3a62da8a5.zip
Don't include incomplete or degraded md arrays in the devicetree.
Diffstat (limited to 'pyanaconda')
-rw-r--r--pyanaconda/storage/devicetree.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 5d5098692..907c315db 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1678,6 +1678,15 @@ class DeviceTree(object):
for leaf in filter(lambda leaf: leaf.type == "lvmvg" and not leaf.complete, self.leaves):
leafInconsistencies(leaf)
+ for md in [d for d in self.leaves if d.type == "mdarray" and len(d.parents) < d.memberDevices]:
+ log.debug("removing incomplete/degraded md array %s" % md.name)
+ try:
+ md.teardown()
+ except StorageError as e:
+ log.error("failed to deactivate %s: %s" % (md.name, e))
+
+ self._removeDevice(md)
+
def _recursiveRemove(self, device):
for d in self.getChildren(device):
self._recursiveRemove(d)