[Bug 1555345] [NEW] ISST-LTE: pVM:multipath -ll cannot show mpath device

Launchpad Bug Tracker 1555345 at bugs.launchpad.net
Wed Mar 9 21:38:31 UTC 2016


You have been subscribed to a public bug:

== Comment: #0 - 2016-03-01 02:44:18 ==
On pinelp2 we installed 16.04. But 'multipath -ll' cannot show mpath device:

% ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Mar  1 00:35 control
lrwxrwxrwx 1 root root       7 Mar  1 00:37 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpatha-part1 -> ../dm-4
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpatha-part2 -> ../dm-5
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpatha-part3 -> ../dm-6
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpatha-part4 -> ../dm-7
lrwxrwxrwx 1 root root       7 Mar  1 00:37 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpathb-part1 -> ../dm-8
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpathb-part2 -> ../dm-9
lrwxrwxrwx 1 root root       8 Mar  1 00:49 mpathb-part3 -> ../dm-12
lrwxrwxrwx 1 root root       8 Mar  1 00:49 mpathb-part4 -> ../dm-14
lrwxrwxrwx 1 root root       7 Mar  1 00:37 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       8 Mar  1 00:49 mpathc-part1 -> ../dm-10
lrwxrwxrwx 1 root root       8 Mar  1 00:49 mpathc-part2 -> ../dm-11
lrwxrwxrwx 1 root root       8 Mar  1 00:49 mpathc-part3 -> ../dm-13
lrwxrwxrwx 1 root root       7 Mar  1 00:49 mpathc-part4 -> ../dm-3
% sudo multipath -ll
% cat /etc/multipath.conf
defaults {
        user_friendly_names "yes"
}
devices {
        device {
                vendor "IBM    T"
                product "RDX-USB3"
        }
}

blacklist {
}

multipaths {
        multipath {
                wwid "36005076304ffc4410000000000000161"
                alias "mpathd"
        }
}
%
% dpkg -S =multipath
multipath-tools: /sbin/multipath
% dpkg -l multipath-tools                       
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-=================================================
ii  multipath-tools        0.5.0-7ubuntu15  ppc64el          maintain multipath block device access
%

== Comment: #5 - Mauricio Faria De Oliveira <mauricfo at br.ibm.com> - 2016-03-09 11:01:11 ==
The problem is the multipath discovery status is finishing with a non-zero status/return code, which early exits the multipath command.

This is probably related by something in the discovery of USB devices.

Blacklisting the sda device (USB) resolves the problem.

== Comment: #9 - Mauricio Faria De Oliveira <mauricfo at br.ibm.com> - 2016-03-09 11:40:45 ==
The problem seems to be the 'return 1' statement to skip USB devices.
It accumulates to the status/return code of the discovery chain to greater than zero, which aborts the multipath command if non-zero.

@ libmultipath/discovery.c

sysfs_get_tgt_nodename()

                        condlog(3, "%s: skip USB device %s", pp->dev, node);
                        return 1;

scsi_sysfs_pathinfo()

        if(sysfs_get_tgt_nodename(pp, pp->tgt_node_name))
                return 1;

        condlog(3, "%s: tgt_node_name = %s",
                pp->dev, pp->tgt_node_name);

        return 0;


	** OK case (hbtl, then tgt_node_name)

		Mar 09 09:50:17 | sdq: h:b:t:l = 1:0:3:3
		Mar 09 09:50:17 | SCSI target 1:0:3 -> FC rport 1:0-7
		Mar 09 09:50:17 | sdq: tgt_node_name = 0x5005076304ffc441

        ** Not OK case (hbtl, then nothing)

		Mar 09 09:50:17 | sda: h:b:t:l = 0:0:0:0
		Mar 09 09:50:17 | sda: skip USB device 2-4:1.0
		Mar 09 09:50:17 | loop0: blacklisted, udev property missing


sysfs_pathinfo()

                if (scsi_sysfs_pathinfo(pp))
                        return 1;

pathinfo()

        if (mask & DI_SYSFS && sysfs_pathinfo(pp))
                return 1;


path_discover()

        return pathinfo(pp, conf->hwtable, flag);

path_discovery()

                        r += path_discover(pathvec, conf,
                                                   udevice, flag);
	...
        condlog(4, "Discovery status %d", r);
        return r;

@ multipath/main.c

configure()

        if (path_discovery(pathvec, conf, di_flag))
                goto out;

        if (conf->verbosity > 2)
                print_all_paths(pathvec, 1);

	** OK case (paths are printed, so print_all_paths() was taken)
	** Not OK case (no paths are printed, so goto out was taken, and print_all_paths was not)

== Comment: #10 - Mauricio Faria De Oliveira <mauricfo at br.ibm.com> - 2016-03-09 13:20:59 ==
This upstream commit should help:

commit 646e754853b123a075b4cede7d9ccf540e8c9b0c
Author: Hannes Reinecke <hare at suse.de>
Date:   Thu Jan 30 11:41:30 2014 +0100

    discovery: do not fail discovery on individual devices
    
    Any errors returned from individual devices during discovery do
    not invalidate the entire discovery. So instead of returning
    the pointless accumulated error count we should be returning
    the number of devices which which could not be discovered or
    the negative error number if the discovery itself failed.
    
    Signed-off-by: Hannes Reinecke <hare at suse.de>

== Comment: #11 - Mauricio Faria De Oliveira <mauricfo at br.ibm.com> - 2016-03-09 13:55:37 ==
The mentioned upstream patch resolves the problem. Posting a patch for Ubuntu 16.04.

Patch is in effect (message 'Discoverered x/y paths').

# multipath -l -v4
...
Mar 09 12:51:48 | sda: udev property SCSI_IDENT_LUN_T10 whitelisted
Mar 09 12:51:48 | sda: not found in pathvec
Mar 09 12:51:48 | sda: mask = 0x21
Mar 09 12:51:48 | sda: dev_t = 8:0
Mar 09 12:51:48 | open '/sys/devices/pci0001:50/0001:50:00.0/usb2/2-4/2-4:1.0/host0/target0:0:0/0:0:0:0/block/sda/size'
Mar 09 12:51:48 | sda: size = 976764976
Mar 09 12:51:48 | sda: vendor = IBM    T
Mar 09 12:51:48 | sda: product = RDX-USB3
Mar 09 12:51:48 | sda: rev = 0195
Mar 09 12:51:48 | sda: h:b:t:l = 0:0:0:0
Mar 09 12:51:48 | sda: skip USB device 2-4:1.0
...
Mar 09 12:51:48 | Discovered 16/56 paths
===== paths list =====
...
mpatha (36005076304ffc44100000000000006ca) dm-0 IBM,2107900
size=30G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 1:0:0:0 sdb 8:16  active undef running
  |- 1:0:1:0 sdf 8:80  active undef running
  |- 1:0:2:0 sdj 8:144 active undef running
  `- 1:0:3:0 sdn 8:208 active undef running
Mar 09 12:51:48 | unloading const prioritizer
Mar 09 12:51:48 | unloading directio checker


Command is OK now w/out the 'blacklist { devnode sda }' entry in /etc/multipath.conf

# multipath -l
mpathc (36005076304ffc441000000000000015f) dm-2 IBM,2107900
size=34G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 1:0:0:2 sdd 8:48  active undef running
  |- 1:0:1:2 sdh 8:112 active undef running
  |- 1:0:2:2 sdl 8:176 active undef running
  `- 1:0:3:2 sdp 8:240 active undef running
mpathb (36005076304ffc441000000000000014d) dm-1 IBM,2107900
size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 1:0:0:1 sdc 8:32  active undef running
  |- 1:0:1:1 sdg 8:96  active undef running
  |- 1:0:2:1 sdk 8:160 active undef running
  `- 1:0:3:1 sdo 8:224 active undef running
mpatha (36005076304ffc44100000000000006ca) dm-0 IBM,2107900
size=30G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  |- 1:0:0:0 sdb 8:16  active undef running
  |- 1:0:1:0 sdf 8:80  active undef running
  |- 1:0:2:0 sdj 8:144 active undef running
  `- 1:0:3:0 sdn 8:208 active undef running

** Affects: multipath-tools (Ubuntu)
     Importance: Undecided
     Assignee: Taco Screen team (taco-screen-team)
         Status: New


** Tags: architecture-ppc64le bugnameltc-138067 severity-critical targetmilestone-inin1604
-- 
ISST-LTE: pVM:multipath -ll cannot show mpath device
https://bugs.launchpad.net/bugs/1555345
You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to multipath-tools in Ubuntu.



More information about the Ubuntu-server-bugs mailing list