<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 12pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi Martin,</div><div>Thanks for the response.</div><div>I built multipath using the latest code to test, but I also see this issue in our product environment(<span style="background-color: rgba(0, 0, 0, 0); font-size: 12pt; line-height: 1.5;">multipath-tools v0.4.9 (05/33, 2016)).</span></div><div><br></div><div>I use getuid_callout is due to the id_serial is not correct as following:</div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">[root@localhost ~]# multipath -ll<br>36005076300810eadf800000000000156 dm-3 IBM,2145<br>size=8.0G features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw<br>|-+- policy='service-time 0' prio=50 status=active<br>| `- 2:0:0:0 sdp 8:240 active ready running<br>`-+- policy='service-time 0' prio=10 status=enabled<br>  `- 2:0:1:0 sdq 65:0  active ready running<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">[root@localhost ~]# udevadm info /dev/sdp<br>P: /devices/pci0000:40/0000:40:02.0/0000:42:00.1/host2/rport-2:0-0/target2:0:0/2:0:0:0/block/sdp<br>N: sdp<br>S: disk/by-id/scsi-36005076300810eadf800000000000156<br>S: disk/by-id/wwn-0x6005076300810eadf800000000000156<br>S: disk/by-path/pci-0000:42:00.1-fc-0x500507680307ab7c-lun-0<br>E: DEVLINKS=/dev/disk/by-id/scsi-36005076300810eadf800000000000156 /dev/disk/by-id/wwn-0x6005076300810eadf800000000000156 /dev/disk/by-path/pci-0000:42:00.1-fc-0x500507680307ab7c-lun-0<br>E: DEVNAME=/dev/sdp<br>E: DEVPATH=/devices/pci0000:40/0000:40:02.0/0000:42:00.1/host2/rport-2:0-0/target2:0:0/2:0:0:0/block/sdp<br>E: DEVTYPE=disk<br>E: ID_BUS=scsi<br>E: ID_MODEL=2145<br>E: ID_MODEL_ENC=2145\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<br>E: ID_PATH=pci-0000:42:00.1-fc-0x500507680307ab7c-lun-0<br>E: ID_PATH_TAG=pci-0000_42_00_1-fc-0x500507680307ab7c-lun-0<br>E: ID_REVISION=0000<br>E: ID_SCSI=1<br>E: ID_SCSI_SERIAL=00c02043ab7eXX00<br>E: ID_SERIAL=36005076300810eadf800000000000156<br>E: ID_SERIAL_SHORT=6005076300810eadf800000000000156<br>E: ID_TARGET_PORT=0<br>E: ID_TYPE=disk<br>E: ID_VENDOR=IBM<br>E: ID_VENDOR_ENC=IBM\x20\x20\x20\x20\x20<br>E: ID_WWN=0x6005076300810ead<br>E: ID_WWN_VENDOR_EXTENSION=0xf800000000000156<br>E: ID_WWN_WITH_EXTENSION=0x6005076300810eadf800000000000156<br>E: MAJOR=8<br>E: MINOR=240<br>E: MPATH_SBIN_PATH=/sbin<br>E: SUBSYSTEM=block<br>E: TAGS=:systemd:<br>E: USEC_INITIALIZED=262761901185<br><br>[root@localhost ~]# /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdp<br>36005076300810eadf800000000000155<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">multipath -v3</span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">===========</span></div>
<div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Jul 11 10:08:49 | libdevmapper version 1.02.135-RHEL7 (2016-11-16)<br>Jul 11 10:08:49 | DM multipath kernel driver v1.9.0<br>Jul 11 10:08:49 | loading /lib64/multipath/libchecktur.so checker<br>Jul 11 10:08:49 | loading /lib64/multipath/libprioconst.so prioritizer<br>Jul 11 10:08:49 | sda: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sda: device node name blacklisted<br>Jul 11 10:08:49 | sdb: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdb: device node name blacklisted<br>Jul 11 10:08:49 | sdk: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdk: device node name blacklisted<br>Jul 11 10:08:49 | sdl: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdl: device node name blacklisted<br>Jul 11 10:08:49 | sdm: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdm: device node name blacklisted<br>Jul 11 10:08:49 | sdc: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdc: device node name blacklisted<br>Jul 11 10:08:49 | sdd: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdd: device node name blacklisted<br>Jul 11 10:08:49 | sde: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sde: device node name blacklisted<br>Jul 11 10:08:49 | sdf: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdf: device node name blacklisted<br>Jul 11 10:08:49 | sdg: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdg: device node name blacklisted<br>Jul 11 10:08:49 | sdh: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdh: device node name blacklisted<br>Jul 11 10:08:49 | sdi: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdi: device node name blacklisted<br>Jul 11 10:08:49 | sdj: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdj: device node name blacklisted<br>Jul 11 10:08:49 | sdp: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdp: mask = 0x1f<br>Jul 11 10:08:49 | sdp: dev_t = 8:240<br>Jul 11 10:08:49 | sdp: size = 16777216<br>Jul 11 10:08:49 | sdp: vendor = IBM<br>Jul 11 10:08:49 | sdp: product = 2145<br>Jul 11 10:08:49 | sdp: rev = 0000<br>Jul 11 10:08:49 | sdp: h:b:t:l = 2:0:0:0<br>Jul 11 10:08:49 | SCSI target 2:0:0 -> FC rport 2:0-0<br>Jul 11 10:08:49 | sdp: tgt_node_name = 0x500507680303ab7c<br>Jul 11 10:08:49 | sdp: path state = running<br>Jul 11 10:08:49 | sdp: 8192 cyl, 64 heads, 32 sectors/track, start at 0<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Jul 11 10:08:49 | sdp: serial = 00c02043ab7eXX00<br>Jul 11 10:08:49 | sdp: get_state<br>Jul 11 10:08:49 | sdp: detect_checker = yes (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | sdp: path_checker = tur (setting: array autodetected)<br>Jul 11 10:08:49 | sdp: checker timeout = 30 ms (setting: multipath internal)<br>Jul 11 10:08:49 | sdp: state = up<br>Jul 11 10:08:49 | sdp: getuid = "/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/%n" (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | sdp: using deprecated getuid callout<br>Jul 11 10:08:49 | formatted callout = /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdp<br>Jul 11 10:08:49 | sdp: uid = 36005076300810eadf800000000000155 (callout)<br>Jul 11 10:08:49 | sdp: detect_prio = yes (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | loading /lib64/multipath/libprioalua.so prioritizer<br>Jul 11 10:08:49 | sdp: prio = alua (setting: array autodetected)<br>Jul 11 10:08:49 | sdp: prio args = "" (setting: array autodetected)<br>Jul 11 10:08:49 | sdp: reported target port group is 0<br>Jul 11 10:08:49 | sdp: aas = 00 [active/optimized]<br>Jul 11 10:08:49 | sdp: alua prio = 50<br>Jul 11 10:08:49 | sdq: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdq: mask = 0x1f<br>Jul 11 10:08:49 | sdq: dev_t = 65:0<br>Jul 11 10:08:49 | sdq: size = 16777216<br>Jul 11 10:08:49 | sdq: vendor = IBM<br>Jul 11 10:08:49 | sdq: product = 2145<br>Jul 11 10:08:49 | sdq: rev = 0000<br>Jul 11 10:08:49 | sdq: h:b:t:l = 2:0:1:0<br>Jul 11 10:08:49 | SCSI target 2:0:1 -> FC rport 2:0-1<br>Jul 11 10:08:49 | sdq: tgt_node_name = 0x500507680303ab7d<br>Jul 11 10:08:49 | sdq: path state = running<br>Jul 11 10:08:49 | sdq: 8192 cyl, 64 heads, 32 sectors/track, start at 0<br>Jul 11 10:08:49 | sdq: serial = 00c02043ab7eXX00<br>Jul 11 10:08:49 | sdq: get_state<br>Jul 11 10:08:49 | sdq: detect_checker = yes (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | sdq: path_checker = tur (setting: array autodetected)<br>Jul 11 10:08:49 | sdq: checker timeout = 30 ms (setting: multipath internal)<br>Jul 11 10:08:49 | sdq: state = up<br>Jul 11 10:08:49 | sdq: getuid = "/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/%n" (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | sdq: using deprecated getuid callout<br>Jul 11 10:08:49 | formatted callout = /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sdq<br>Jul 11 10:08:49 | sdq: uid = 36005076300810eadf800000000000155 (callout)<br>Jul 11 10:08:49 | sdq: detect_prio = yes (setting: multipath.conf defaults/devices section)<br>Jul 11 10:08:49 | sdq: prio = alua (setting: array autodetected)<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Jul 11 10:08:49 | sdq: prio args = "" (setting: array autodetected)<br>Jul 11 10:08:49 | sdq: reported target port group is 1<br>Jul 11 10:08:49 | sdq: aas = 01 [active/non-optimized]<br>Jul 11 10:08:49 | sdq: alua prio = 10<br>Jul 11 10:08:49 | dm-0: blacklisted, udev property missing<br>Jul 11 10:08:49 | dm-1: blacklisted, udev property missing<br>Jul 11 10:08:49 | dm-2: blacklisted, udev property missing<br>Jul 11 10:08:49 | dm-3: blacklisted, udev property missing<br>===== paths list =====<br>uuid                              hcil    dev dev_t pri dm_st chk_st vend/prod<br>36005076300810eadf800000000000155 2:0:0:0 sdp 8:240 50  undef undef  IBM,2145<br>36005076300810eadf800000000000155 2:0:1:0 sdq 65:0  10  undef undef  IBM,2145<br>Jul 11 10:08:49 | params = 2 queue_if_no_path retain_attached_hw_handler 1 alua 2 1 service-time 0 1 2 8:240 1 1 service-time 0 1 2 65:0 1 1<br>Jul 11 10:08:49 | status = 2 0 1 0 2 1 A 0 1 2 8:240 A 5 0 1 E 0 1 2 65:0 A 6 0 1<br>Jul 11 10:08:49 | 36005076300810eadf800000000000156: disassemble map [2 queue_if_no_path retain_attached_hw_handler 1 alua 2 1 service-time 0 1 2 8:240 1 1 service-time 0 1 2 65:0 1 1 ]<br>Jul 11 10:08:49 | 8:240: path wwid appears to have changed. Using map wwid.<br><br>Jul 11 10:08:49 | 65:0: path wwid appears to have changed. Using map wwid.<br><br>Jul 11 10:08:49 | 36005076300810eadf800000000000156: disassemble status [2 0 1 0 2 1 A 0 1 2 8:240 A 5 0 1 E 0 1 2 65:0 A 6 0 1 ]<br>Jul 11 10:08:49 | sdp: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | sdq: udev property ID_WWN whitelisted<br>Jul 11 10:08:49 | tur checker refcount 2<br>Jul 11 10:08:49 | alua prioritizer refcount 2<br>Jul 11 10:08:49 | tur checker refcount 1<br>Jul 11 10:08:49 | alua prioritizer refcount 1<br>Jul 11 10:08:49 | unloading alua prioritizer<br>Jul 11 10:08:49 | unloading const prioritizer<br>Jul 11 10:08:49 | unloading tur checker<br></span></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>liuqing@huayun.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:mwilck@suse.com">Martin Wilck</a></div><div><b>Date:</b> 2017-07-10 21:55</div><div><b>To:</b> <a href="mailto:dm-devel@redhat.com">dm-devel</a>; <a href="mailto:liuqing@huayun.com">liuqing</a></div><div><b>Subject:</b> Re: [dm-devel] Multipath ID not equal to LUN scsi ID</div></div></div><div><div>On Mon, 2017-07-10 at 17:58 +0800, liuqing@huayun.com wrote:</div>
<div>> Dear list,</div>
<div>> We have a FC storage and using multipathd to manager the FC paths.</div>
<div>> I've met an issue in this environment. The following is how to</div>
<div>> recreate the issue.</div>
<div> </div>
<div>Which version of multipath-tools have you been using? Could you please</div>
<div>run multipathd with "-v 3" and provide the logs of the procedure below?</div>
<div> </div>
<div>Is there a specific reason why you are using the "getuid_callout"</div>
<div>option rather than "uid_attribute"?</div>
<div> </div>
<div>Regards,</div>
<div>Martin</div>
<div> </div>
<div>> </div>
<div>> =======</div>
<div>> 1. Map a LUN to host with LUN ID 0,</div>
<div>> 2. rescan fc_host, a new path will be found by multipath.</div>
<div>> 3. Unmap LUN 0.  path will failed as following.</div>
<div>> [root@localhost sys]# multipath -ll</div>
<div>> Jul 10 18:41:50 | sdp: couldn't get asymmetric access state</div>
<div>> Jul 10 18:41:50 | sdq: couldn't get asymmetric access state</div>
<div>> 36005076300810eadf800000000000156 dm-3 IBM,2145</div>
<div>> size=8.0G features='2 queue_if_no_path retain_attached_hw_handler' hw</div>
<div>> handler='1 alua' wp=rw</div>
<div>> |-+- policy='service-time 0' prio=0 status=enabled</div>
<div>> | `- 2:0:0:0 sdp 8:240 failed faulty running</div>
<div>> `-+- policy='service-time 0' prio=0 status=enabled</div>
<div>>   `- 2:0:1:0 sdq 65:0  failed faulty running</div>
<div>> 4. Map another LUN which have different ID_SERIAL but with the same</div>
<div>> LUN ID(0). Multipath(check_path function) will set the paths up, tur</div>
<div>> checker will successfully test the LUN. </div>
<div>> [root@localhost sys]# /lib/udev/scsi_id --whitelisted --replace-</div>
<div>> whitespace --device=/dev/mapper/36005076300810eadf800000000000156</div>
<div>> 36005076300810eadf800000000000155</div>
<div>>  I think this is not right, although I do not remove the device by</div>
<div>> 'echo 1> /sys/block/sdp/device/delete'. A multipath is identified by</div>
<div>> LUN scsi ID, in this situation the multipath</div>
<div>> ID is not equal to LUN scsi ID. And if I add the previous LUN back,</div>
<div>> the paths will also be added to that multipath</div>
<div>> id(36005076300810eadf800000000000156).</div>
<div>> </div>
<div>> Any suggestion on how to make it create a new node in /dev with</div>
<div>> correct scsi ID? Thanks.</div>
<div>> </div>
<div>> </div>
<div>> ===========</div>
<div>> [root@localhost sys]# cat /etc/multipath.conf</div>
<div>> defaults {</div>
<div>>     features "0"</div>
<div>>     no_path_retry           queue</div>
<div>>     getuid_callout "/lib/udev/scsi_id --whitelisted --replace-</div>
<div>> whitespace --device=/dev/%n"</div>
<div>> }</div>
<div>> blacklist {</div>
<div>>     devnode "sd[a-m]"</div>
<div>> }</div>
<div>> </div>
<div>> liuqing@huayun.com</div>
<div>> --</div>
<div>> dm-devel mailing list</div>
<div>> dm-devel@redhat.com</div>
<div>> https://www.redhat.com/mailman/listinfo/dm-devel</div>
<div> </div>
<div>-- </div>
<div>Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107</div>
<div>SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton</div>
<div>HRB 21284 (AG Nürnberg)</div>
<div> </div>
</div></blockquote>
</body></html>