multipath -l can be very slow
Bug #1487169 reported by
Walt Boring
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-brick |
Fix Released
|
Medium
|
Kendall Nelson |
Bug Description
When there are many volumes attached to a host, running multipath -l <device> to discover the multipath device and it's paths can be extremely slow.
Changed in os-brick: | |
status: | New → In Progress |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/213389 /git.openstack. org/cgit/ openstack/ os-brick/ commit/ ?id=3ea86f7d605 d7109f4e13c1566 ba1a14dc856443
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3ea86f7d605d710 9f4e13c1566ba1a 14dc856443
Author: Walter A. Boring IV <email address hidden>
Date: Fri Aug 14 17:39:15 2015 -0700
FC Stop calling multipath command line
This patch changes how we discover Multipath devices for
FibreChannel volume attaches.
Running multipath -l <device> can become slower and slower
as more and more volumes are attached to a host. To overcome this,
there are ways of discovering multipath device paths without
using the multipath -l command at all.
When multipath daemon is running, and it discovers new volumes,
it will create new device paths for the multipath device associated
with that new volume. Those multipath device paths are predictable
and show up after the multipath device is created. This avoids
the repeated looping calls to multipath -l to discover the same paths.
SCSI volumes have a WWN that's supposed to be in page 0x83 on the volume
itself according to the SCSI SPC-3 spec. That WWN is where the multipath
daemon gets it's multipath ID from and what is used to create the predictable
multipath device paths on the system.
When multipath friendly names are disabled, you get paths of disk/by- id/dm-uuid- mpath-< WWN> disk/by- id/scsi- <WWN> mapper/ <WWN>
/dev/
/dev/
/dev/
When multipath friendly names are enabled, you get paths of disk/by- id/dm-uuid- mpath-< WWN> disk/by- id/dm-name- mpath<N> disk/by- id/scsi- mpath<N> mapper/ mpath<N>
/dev/
/dev/
/dev/
/dev/
This patch does 3 different attempts to find a multipath device path to
use.
First it looks in the common location of: disk/by- id/dm-uuid- mpath-< WWN>
/dev/
Then in the non friendly name path of: mapper/ <WWN>
/dev/
And lastly using the fallback of calling multipath -l <device> to get: mapper/ mpath<N>
/dev/
Partial-Bug: 1487169 c2750b1e7927475 093bde36d04
Change-Id: I9a9fffcb6882b1