[PATCH 3/4] Don't identify multi lun usb card readers as multipath (#517603)

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

 



Some usb cardreaders use multiple lun's (for different slots) and report a
fake disk serial which is the same for all the lun's (#517603)

So if we have multiple disks with all the same serial, if they are all
using the usb-storage driver, assume they are single path instead of
multipath.
---
 storage/devicetree.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index a76dfff..f4596de 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1796,6 +1796,20 @@ class DeviceTree(object):
                 log.info("adding %s to singlepath_disks" % (disks[0]['name'],))
                 singlepath_disks.append(disks[0])
             else:
+                # some usb cardreaders use multiple lun's (for different slots)
+                # and report a fake disk serial which is the same for all the
+                # lun's (#517603)
+                all_usb = True
+                for d in disks:
+                    if d.get("ID_USB_DRIVER") != "usb-storage":
+                        all_usb = False
+                        break
+                if all_usb:
+                    log.info("adding multi lun usb mass storage device to singlepath_disks: %s" %
+                             [disk['name'] for disk in disks])
+                    singlepath_disks.extend(disks)
+                    continue
+
                 multipath_members = {}
                 for d in disks:
                     log.info("adding %s to multipath_disks" % (d['name'],))
-- 
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