[PATCH] Fix remaining issues with md fwraid. (#872739)

Brian C. Lane bcl at redhat.com
Fri Nov 2 23:05:13 UTC 2012


On Fri, Nov 02, 2012 at 04:55:01PM -0500, David Lehman wrote:
> ---
>  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

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20121102/45e79c73/attachment.sig>


More information about the anaconda-patches mailing list