Some USB devices even present VPD pages, but they still remain USB devices, and we shouldn't run multipath on those. So detect USB devices properly and skip them during discovery. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- libmultipath/discovery.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index a9962d1..c4aee1c 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -275,6 +275,19 @@ sysfs_get_tgt_nodename (struct path *pp, char * node) } } + /* Check for USB */ + tgtdev = udev_device_get_parent(parent); + while (tgtdev) { + value = udev_device_get_subsystem(tgtdev); + if (value && !strcmp(value, "usb")) { + pp->sg_id.proto_id = SCSI_PROTOCOL_UNSPEC; + tgtname = udev_device_get_sysname(tgtdev); + strncpy(node, tgtname, strlen(tgtname)); + condlog(3, "%s: skip USB device %s", pp->dev, node); + return 1; + } + tgtdev = udev_device_get_parent(tgtdev); + } parent = udev_device_get_parent_with_subsystem_devtype(pp->udev, "scsi", "scsi_target"); if (!parent) return 1; -- 1.8.4.5 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel