[PATCH 2/2] Fix ordering on device list returned from identifyMultipaths()

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

 



This makes the ordering consistent with how it was before multipath went
in, as well as adding some explanitory comments to identifyMultipath()
---
 storage/devicetree.py |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index f738922..7839d38 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1775,6 +1775,15 @@ class DeviceTree(object):
                 disk.format = format
 
     def identifyMultipaths(self, devices):
+        # this function does a couple of things
+        # 1) identifies multipath disks
+        # 2) sets their ID_FS_TYPE to multipath_member
+        # 3) removes the individual members of an mpath's partitions
+        # sample input with multipath pairs [sda,sdc] and [sdb,sdd]
+        # [sr0, sda, sda1, sdb, sda2, sdc, sdd, sdc1, sdc2, sde, sde1]
+        # sample output:
+        # [sr0, sda, sdb, sdc, sdd, sde, sde1]
+
         log.info("devices to scan for multipath: %s" % [d['name'] for d in devices])
         serials = {}
         non_disk_devices = {}
@@ -1816,7 +1825,11 @@ class DeviceTree(object):
         for devices in non_disk_devices.values():
             partition_devices += devices
 
-        return partition_devices + multipath_disks + singlepath_disks
+        # the order here is important for now; partitions need to be after
+        # their disks or dmraid gets weird.
+        retdevs = singlepath_disks + multipath_disks + partition_devices
+        log.info("devices post multipath scan: %s" % [d['name'] for d in retdevs])
+        return retdevs
 
     def populate(self):
         """ Locate all storage devices. """
-- 
1.6.4

_______________________________________________
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