[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] an interesting note on LUN coalescing



What I am going to do is this. I will do a page 0x83 EVPD page inquiry before entering the find_mp_by_wwid function. I will strncmp the NAA number from page 0x83 with the wwid. If I find a difference, I will log it. I expect that if I just step on the wwid with the NAA number that I get from page 0x83 that I get if the two are different then my problem will go away, but it would be interesting to see how the difference happens. I will update with my findings once it fires again.

Just as an aside, why not just use the NAA page 0x83 number instead of the callout to scsi_id? The inquiry plumbing is all there already in discovery to get the serial number and with a small addition could return the NAA value as a string to match the wwid expectation.

Thanks,
Brian

On May 15, 2014, at 2:09 PM, Christophe Varoqui <christophe varoqui opensvc com> wrote:

Hi,

you could also try to extend your observation to the timing of the udev triggers.

You did not describe the scenario leading to this misbehaviour, but if it involves paths remove-readd it's critical udev completed the /dev/ entries janitoring ... unless multipathd might exec scsi_id on the wrong devices.

Latest distro versions implement a strict serialization, using the udevd socket, thanks to Hannes work. You might try to reproduce the problem with those to get a broader viewpoint, but it sure won't help with your supporting your products on older distros.

Best regards,
Christophe Varoqui


On Thu, May 15, 2014 at 10:40 PM, Stewart, Sean <Sean Stewart netapp com> wrote:
On Thu, 2014-05-15 at 10:23 -0700, Brian Bunker wrote:
> I will get both the page 0x83 and page 0x80 data of the path when the problem happens. In our case the page 0x83 and page 0x80 data are the same always. The page 0x83 data has the additional encoding and OUI information but the bytes after that 3624a9370 are exactly the same. I am wondering about how the path gets its wwid when it comes back.

This is through the call to /lib/udev/scsi_id, which pulls it from page
0x83.  The function that does it is called get_uid().  It calls the
external program, then strips trailing whitespace, replacing spaces with
null characters.  You could try simply making the log message in that
function a level 2 instead of a 3, so we'll know that get_uid completed
for the path, and what it found for the uid.

>
> In our case we have a controller coming back online after doing something. All the LUNs are re-discovered by the initiator and an sd device gets created for each LUN path which came back. The serial of the sd device at that time I believe is known to the initiator. The multipathd gets that sd device and comes up with a wwid. I would expect that wwid would be just the serial number plus some bytes in the beginning but that is not what we see in the fail case. The path wwid and path serial are pointing to different volumes on the array. I expect that the sd device will show the same data for page 0x83 and page 0x80 pointing to the same volume on the array but I will verify that with more logging.
>
Similar to what I said above, you could change the log message in
scsi_ioctl_pathinfo (after the get_serial call) from level 3 to level 2.

Beyond that, I don't have many more ideas here..  Another wild guess, I
suppose it's possible that the data from the 0x83 inquiry at the time of
discovery could be incomplete?  Then, when you run the command later,
manually, after it comes up, it appears just fine. I don't think I see
the code zeroing the memory for the wwid in the newly allocated path
struct before it tries to populate the buffer, but that seems kind of
farfetched.

> You can see from my previous posts on this issue. (They go back for some time). That the page 0x83 and page 0x80 from sg3_utils show that they point to same LUN but different from the dm device that they are coalesced under.
>
> Thanks,
> Brian

Hope this helps.

Thanks,
Sean

--
dm-devel mailing list
dm-devel redhat com
https://www.redhat.com/mailman/listinfo/dm-devel

Brian Bunker




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]