Bug 1127929

Summary: "dev_is_mpath: failed to get device for 8:1" error when pvcreating
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Devices, Filtering and Stacking (RHEL6) QA Contact: Cluster QE <mspqa-list>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, tlavigne, zkabelac
Version: 6.6Keywords: Regression
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.109-2.el6 Doc Type: Bug Fix
Doc Text:
This bug did not appear in official RHEL release. No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 08:25:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2014-08-07 21:37:32 UTC
Description of problem:

lvmetad is turned off, and this doesn't apper in the -108 build.

[root@host-025 ~]# ls -lrt /dev/sd*
brw-rw----. 1 root disk 8,   1 Aug  7 16:18 /dev/sda1
brw-rw----. 1 root disk 8,  17 Aug  7 16:18 /dev/sdb1
brw-rw----. 1 root disk 8,  49 Aug  7 16:18 /dev/sdd1
brw-rw----. 1 root disk 8,  65 Aug  7 16:18 /dev/sde1
brw-rw----. 1 root disk 8,  81 Aug  7 16:18 /dev/sdf1
brw-rw----. 1 root disk 8,  97 Aug  7 16:18 /dev/sdg1
brw-rw----. 1 root disk 8,  32 Aug  7  2014 /dev/sdc
brw-rw----. 1 root disk 8,  96 Aug  7  2014 /dev/sdg
brw-rw----. 1 root disk 8, 112 Aug  7  2014 /dev/sdh
brw-rw----. 1 root disk 8,  64 Aug  7  2014 /dev/sde
brw-rw----. 1 root disk 8,   0 Aug  7  2014 /dev/sda
brw-rw----. 1 root disk 8,  48 Aug  7  2014 /dev/sdd
brw-rw----. 1 root disk 8,  80 Aug  7  2014 /dev/sdf
brw-rw----. 1 root disk 8, 113 Aug  7  2014 /dev/sdh1
brw-rw----. 1 root disk 8,  33 Aug  7  2014 /dev/sdc1
brw-rw----. 1 root disk 8,  16 Aug  7  2014 /dev/sdb

[root@host-025 ~]# pvcreate /dev/sd[abcdefgh]1
  dev_is_mpath: failed to get device for 8:1
  dev_is_mpath: failed to get device for 8:17
  dev_is_mpath: failed to get device for 8:33
  dev_is_mpath: failed to get device for 8:49
  dev_is_mpath: failed to get device for 8:65
  dev_is_mpath: failed to get device for 8:81
  dev_is_mpath: failed to get device for 8:97
  dev_is_mpath: failed to get device for 8:113
  Physical volume "/dev/sda1" successfully created
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sde1" successfully created
  Physical volume "/dev/sdf1" successfully created
  Physical volume "/dev/sdg1" successfully created
  Physical volume "/dev/sdh1" successfully created


Version-Release number of selected component (if applicable):
2.6.32-495.el6.x86_64
lvm2-2.02.109-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
lvm2-libs-2.02.109-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
lvm2-cluster-2.02.109-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.88-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
device-mapper-libs-1.02.88-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
device-mapper-event-1.02.88-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
device-mapper-event-libs-1.02.88-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.109-1.el6    BUILT: Tue Aug  5 10:36:23 CDT 2014

Comment 1 Peter Rajnoha 2014-08-08 09:07:06 UTC
That was an incorrect use of device cache in mpath filter code! This is because we use refresh_filters now in v109 (see also bug #1113539) which revealed this problem. We should not use device cache for primary name lookup for the partition (as one of the steps) as the primary name can already be filtered out by persistent filter. So that was a wrong assumption made when adding partition support in mpath filter.

This should be now fixed with:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=9738a02d3d56a3a30bd8b59838eae8f805ba3bcc

Comment 3 Nenad Peric 2014-08-20 14:19:36 UTC
Before the update to 109-2

[root@virt-065 ~]# pvcreate /dev/sd[abcdefgh]1
  dev_is_mpath: failed to get device for 8:1
  dev_is_mpath: failed to get device for 8:17
  dev_is_mpath: failed to get device for 8:33
  dev_is_mpath: failed to get device for 8:49
  dev_is_mpath: failed to get device for 8:65
  dev_is_mpath: failed to get device for 8:81
  dev_is_mpath: failed to get device for 8:97
  dev_is_mpath: failed to get device for 8:113
  dev_is_mpath: failed to get device for 8:129
  Physical volume "/dev/sda1" successfully created
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sde1" successfully created
  Physical volume "/dev/sdf1" successfully created
  Physical volume "/dev/sdg1" successfully created
  Physical volume "/dev/sdh1" successfully created


After the update to 109-2:

[root@virt-065 ~]# pvcreate /dev/sd[abcdefgh]1
  Physical volume "/dev/sda1" successfully created
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sde1" successfully created
  Physical volume "/dev/sdf1" successfully created
  Physical volume "/dev/sdg1" successfully created
  Physical volume "/dev/sdh1" successfully created


Verified with:

lvm2-2.02.109-2.el6.x86_64

Comment 4 errata-xmlrpc 2014-10-14 08:25:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1387.html