On Fri, 2018-08-24 at 14:50 +0800, Guan Junxiong wrote: > Hi,Martin > Thanks for your reply. > The command "multipathd list paths format %N %R %n %r" or "lsscsi -t" > shows all the paths. > The new command "multipath -k" removes the path of information with > the same host wwn and > target wwn, only display the different physical path which is between > a server and the > storage device in storage networking. We think this command will make > it easier to observe > physical path information. Hm, I'm not getting it. Your own example (below) shows the same host/target WWNN/WWPN tuple twice. Looking at the code, you seem to group SCSI paths that have equal host, channel, device IDs (IOW, you ignore difference by LUN), and take just one path out of each group. I can see that this shortens and simplifies the output, but still it has nothing to do with multipath, and could be achieved otherwise. What about "multipathd list paths format %N %R %n %r | sort -u" ? Maybe I'm still missing something, but anyway, my main objection is that multipath is not meant as a tool for printing fibre channel topology. There are other tools for this purpose. Martin > > Best regards. > > > On 2018/8/21 21:31, Martin Wilck wrote: > > Hello Guan, > > > > On Tue, 2018-08-07 at 11:03 +0800, guanjunxiong 00401709 wrote: > > > From: dingwenyi 00297106 <dingwenyi@xxxxxxxxxx> > > > > > > This patch adds a new parameter which named -k to display links > > > information in the multipath command. > > > Command 'multipath -k' display paths with the same host wwn and > > > target wwn as one link information. > > > The cmd display the following information to quickly and easily > > > find > > > the host and target information. > > > [root@localhost mp]# ./multipath -k > > > link host_wwnn=0x20000024ff2e8092 host_wwpn=0x21000024ff2e8092 > > > target_wwnn=0x2100333435363738 target_wwpn=0x2201333435363738 > > > link host_wwnn=0x20000024ff2e8092 host_wwpn=0x21000024ff2e8092 > > > target_wwnn=0x2100333435363738 target_wwpn=0x2211333435363738 > > > > Thanks for the patch. But I have to say I see little value in > > adding > > this option to multipath. What's wrong with simply running > > "multipathd list paths format %N %R %n %r", or wrapping that > > command in > > a simple shell script? Actually, this has nothing to do with > > multipath > > at all, it's really transport-related information similar to > > "lsscsi -t" output. > > > > Regards, > > Martin > > > > -- Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel