[dm-devel] [PATCH 28/57] libmultipath: use a shared lock to co-operate with udev

Germano Percossi germano.percossi at citrix.com
Wed May 4 11:25:34 UTC 2016


Hi Ben,

On 05/03/2016 09:23 PM, Benjamin Marzinski wrote:
> On Tue, May 03, 2016 at 04:31:19PM +0100, Germano Percossi wrote:
>>
>> I just want to make sure XenServer is not among those that need to
>> be saved from themselves.
>> We do mix multipathd and multipath commands but in a way that we think
>> is safe: we add devices with "multipath -r" and remove with "multipath -f".
>> This is because we slightly bend the wwids file usage to be used
>> as a blacklisting mechanism (in our own way).
>
> The only way you would be likely to run into problems is if you would be
> running "multipath -r" at the same time as the udev add event for the
> first path device was happening.  We only lock the devices on the
> initial create.
>
> But doesn't multipathd try to add these devices too?

In our case, no.
What we did is to remove condition 1 for "find_multipaths yes".
So, unless someone (or something) else adds the wwid to the
wwids file, the path is ignored.
Doing this way, it is our storage manager that decides when it is time 
for a path to be used by multipath and, to this end, it invokes
multipath -r.

So, from our point of view, there should not be interactions with
multipathd but I could be wrong.

For what concerns udev, I am not sure what are your intentions about
the lock.
If it is just to protect udev and multipathd, then we could have 
problems with multipath.

Germano

>
> -Ben
>




More information about the dm-devel mailing list