Skip to contentSkip to conversation

a question about multipathd and udev

DISCUSSION dwu 2 participants 2 messages Oct 21, 2008 Device mapper

lore
Share & tools
lore

dwu

author
#0 lore raw

If a block device is added, the udev will run the command multipath to add the path to the mp if possible. Why multipathd also process a path addition event:

(!strncmp(uev->action, "add", 3)) {
       r = uev_add_path(devname, vecs);
       goto out;

}

Thanks.

#1 lore raw
Quoted 2 lines · dwu

If a block device is added, the udev will run the command multipath to add the path to the mp if possible.

That depends on your distro. Some of the udev rules do not call the multipath program but instead pass on the uevent to a netlink socket:

(look for 96-multipath-late.rules):

RUN+="socket:/org/kernel/dm/multipath_event"

and let the multipathd handle the uevent.

Quoted 3 lines

Why multipathd also process a path addition event:

(!strncmp(uev->action, "add", 3)) {
       r = uev_add_path(devname, vecs);

Take a look at the logic of the uev_add_path. It extracts the block device name and figures out to what multipath map this device belongs too, runs the appropiate path checker, and lastly updates (or creates) the device mapper map with the right major:minor, weights, etc.

Quoted 9 lines
       goto out;

}

Thanks.

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel