[PATCH] Fix remaining issues with md fwraid. (#872739)
David Lehman
dlehman at redhat.com
Fri Nov 2 21:55:01 UTC 2012
---
pyanaconda/storage/devices.py | 4 ++++
pyanaconda/storage/devicetree.py | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 16ea5f0..f0ebc64 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -1347,6 +1347,10 @@ class PartitionDevice(StorageDevice):
dm_node = dm.dm_node_from_name(self.name)
path = os.path.join("/sys", self.sysfsBlockDir, dm_node)
self.sysfsPath = os.path.realpath(path)[4:]
+ elif isinstance(self.parents[0], MDRaidArrayDevice):
+ md_node = mdraid.md_node_from_name(self.name)
+ path = os.path.join("/sys", self.sysfsBlockDir, md_node)
+ self.sysfsPath = os.path.realpath(path)[4:]
else:
StorageDevice.updateSysfsPath(self)
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index d30b8f0..be14ba2 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -788,6 +788,12 @@ class DeviceTree(object):
sysfs_path = udev_device_get_sysfs_path(info)
device = None
+ if name.startswith("md"):
+ name = devicelibs.mdraid.name_from_md_node(name)
+ device = self.getDeviceByName(name)
+ if device:
+ return device
+
if disk is None:
disk_name = os.path.basename(os.path.dirname(sysfs_path))
disk_name = disk_name.replace('!','/')
--
1.7.6.5
More information about the anaconda-patches
mailing list