I/O errors on multipath devices due to kpartx setting up wrong mapping

Solution Unverified - Updated -

Issue

  • Using several multipaths containing several partitions, with multipath having names such as: XXX, XXX2 and XXX3 (i.e. : numbering the devices, but remove the digit of the first occurrence, instead of using digit 1), it is likely that the Operating System will be confused between XXX2 as XXX's second partition and XXX2 multipath device.

  • Example, using 3 devices, named from "mympath" to mympath3, and each of them having 3 partitions, the device-mapper table may look like :

# dmsetup table
mympathp3: 0 65432745 linear 253:14 1992060
mympathp2: 0 996030 linear 253:14 996030
mympathp1: 0 995967 linear 253:14 63
mympath3: 0 65432745 linear 253:14 1992060       <= incorrect, this one is supposed to be a multipath map
mympath2: 0 996030 linear 253:14 996030       <= incorrect, this one is supposed to be a multipath map
mympath: 0 67436544 multipath 1 queue_if_no_path 0 1 1 round-robin 0 4 1 66:64 1000 68:16 1000 69:224 1000 8:112 1000
mympath2p3: 0 65432745 linear 253:15 1992060
mympath3p3: 0 65432745 linear 253:6 1992060
mympath2p2: 0 996030 linear 253:15 996030
mympath3p2: 0 996030 linear 253:6 996030
mympath2p1: 0 995967 linear 253:15 63
mympath3p1: 0 995967 linear 253:6 63
  • However, this is incorrect, as mympath2 and mympath3 are supposed to be multipath maps, and not linear (e.g. : similar to mympath).

  • This results in I/O errors (attempts to access beyond end of device), and potentially corruption if the I/O succeed, but mapped to a wrong device.

  • Example : from the table above, an attempt to read from mympath2p1 will actually be redirected to the multipath map, which is a different device.

Environment

  • Red Hat Enterprise Linux v. 5
  • device-mapper-multipath
  • iniscripts <= 8.45.42-1.el5
  • multipath named in a certain way, as described in the Issue section

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.