summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-09-15 12:08:38 +0200
committerHans de Goede <hdegoede@redhat.com>2009-09-15 20:28:32 +0200
commitd9fe8feabedd6a88f9f51a97b1c420194788464a (patch)
tree6bb155d28ce7b7bc88b03c1075cff269d2bf07cf /storage
parentc40d7d8c0fa76b1367e1c195e65946ee5f5315a9 (diff)
downloadanaconda-d9fe8feabedd6a88f9f51a97b1c420194788464a.tar.gz
anaconda-d9fe8feabedd6a88f9f51a97b1c420194788464a.tar.xz
anaconda-d9fe8feabedd6a88f9f51a97b1c420194788464a.zip
Don't scan stopped md devices
mdraid is really braindead, when a device is stopped it is no longer usefull in anyway (and we should not probe it) yet it still sticks around, see bug rh523387
Diffstat (limited to 'storage')
-rw-r--r--storage/udev.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/udev.py b/storage/udev.py
index f6347d52f..f07b3ca70 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -60,6 +60,16 @@ def udev_get_block_devices():
for path in udev_enumerate_block_devices():
entry = udev_get_block_device(path)
if entry:
+ if entry["name"].startswith("md"):
+ # mdraid is really braindead, when a device is stopped
+ # it is no longer usefull in anyway (and we should not
+ # probe it) yet it still sticks around, see bug rh523387
+ state = None
+ state_file = "/sys/%s/md/array_state" % entry["sysfs_path"]
+ if os.access(state_file, os.R_OK):
+ state = open(state_file).read().strip()
+ if state == "clear":
+ continue
entries.append(entry)
return entries