<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 12pt; font-family: Î¢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
Hi <span style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Steffen,</span><div><font face="΢ÈíÑźÚ, Tahoma"><span style="font-size: 14px; line-height: normal;">Once a new arrived LUN mapped we will do rescan by "</span></font><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">echo '- - -' > /sys/class/scsi_host/host2/scan". After rescan only the scsi_id tool give the right serial id, udevadm still got the prvious one.</span></div><div><span style="font-size: 14px;"><font face="΢ÈíÑźÚ, Tahoma">I have monitor the udev event by udevadm monitor while mapping a new LUN to the host, who will reuse the original path. No add event is triggerred, only dm-X emits a change event. </font></span></div><div><span style="font-size: 14px;"><font face="΢ÈíÑźÚ, Tahoma">But if the original path is deleted(removed) then add event will be triggerred.</font></span></div><div><span style="font-size: 14px;"><font face="΢ÈíÑźÚ, Tahoma"><br></font></span></div><div><span style="font-size: 14px;"><font face="΢ÈíÑźÚ, Tahoma">Flush the old WWID could make the WWID correct but the size is still incorrect as following. And </font></span><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; line-height: 21px; background-color: window;">36005076300810eadf800000000000155 is actually 5GB. </span></div><div><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">[root@localhost ~]# multipath -v2<br>Jul 11 12:36:06 | sdp: using deprecated getuid callout<br>Jul 11 12:36:06 | sdq: using deprecated getuid callout<br>create: 36005076300810eadf800000000000155 undef IBM,2145<br>size=8.0G features='1 queue_if_no_path' hwhandler='0' wp=undef</span></div><div><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div><span style="font-family: '΢ÈíÑźÚ, Tahoma'; font-size: 14px; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">I built the tool using latest code and tried both attribute_id and getuid_callout. The issue exist in both configuration.<br></span><div><br></div><div><br></div>
<div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> Dear list,</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> We have a FC storage and using multipathd to manager the FC paths.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> I've met an issue in this environment. The following is how to recreate the issue.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">></div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> =======</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 1. Map a LUN to host with LUN ID 0,</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 2. rescan fc_host, a new path will be found by multipath.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 3. Unmap LUN 0.  path will failed as following.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> [root@localhost sys]# multipath -ll</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> Jul 10 18:41:50 | sdp: couldn't get asymmetric access state</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> Jul 10 18:41:50 | sdq: couldn't get asymmetric access state</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 36005076300810eadf800000000000156 dm-3 IBM,2145</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> size=8.0G features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> |-+- policy='service-time 0' prio=0 status=enabled</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> | `- 2:0:0:0 sdp 8:240 failed faulty running</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> `-+- policy='service-time 0' prio=0 status=enabled</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>    `- 2:0:1:0 sdq 65:0  failed faulty running</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 4. Map another LUN which have different ID_SERIAL but with the same LUN ID(0).</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Did you "rescan" the SCSI device via sysfs to let Linux know that this</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">is now in fact a different device?</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">AFAIK, Linux decodes SCSI sense data for LUNs remapped on the storage</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">target and emits a udev event, but I'm not aware of any default udev</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">rule that would actually react. The kernel itself does not react other</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">than creating the uevent.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> Multipath(check_path function) will set the paths up, tur checker will successfully test the LUN.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> [root@localhost sys]# /lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/36005076300810eadf800000000000156</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> 36005076300810eadf800000000000155</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>   I think this is not right, although I do not remove the device by 'echo 1> /sys/block/sdp/device/delete'. A multipath is identified by LUN scsi ID, in this situation the multipath</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> ID is not equal to LUN scsi ID. And if I add the previous LUN back, the paths will also be added to that multipath id(36005076300810eadf800000000000156).</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">></div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> Any suggestion on how to make it create a new node in /dev with correct scsi ID? Thanks.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">If you assume the old mapped volume would be gone, you could also flush</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">the mpath map with the old WWID.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">After the SCSI device rescan it should create a new map with the new WWID.</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">></div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> ===========</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> [root@localhost sys]# cat /etc/multipath.conf</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> defaults {</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>      features "0"</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>      no_path_retry           queue</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>      getuid_callout "/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/%n"</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">IIRC, using an explicit getuid_callout has been deprecated in later</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">releases of multipath tools and it would use builtin code to determine</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">the necessary information, potentially even using inquiry data cached in</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">the kernel (exported via sysfs).</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">If your toolchain is recent enough, would it work without this conf setting?</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> }</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> blacklist {</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">>      devnode "sd[a-m]"</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">> }</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">--</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Mit freundlichen Gr??en / Kind regards</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Steffen Maier</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Linux on z Systems Development</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;"> </div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">IBM Deutschland Research & Development GmbH</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Vorsitzende des Aufsichtsrats: Martina Koederitz</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Geschaeftsfuehrung: Dirk Wittkopp</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Sitz der Gesellschaft: Boeblingen</div><div style="font-family: Î¢ÈíÑźÚ, Tahoma; font-size: 14px; line-height: normal;">Registergericht: Amtsgericht Stuttgart, HRB 243294</div></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>
</div></body></html>