Bug 177411

Summary: LVM scans physical paths after mpio is set up
Product: Red Hat Enterprise Linux 4 Reporter: Rod Nayfield <nayfield>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: bmarzins, coughlan, jbrassow, nayfield
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-10 21:21:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rod Nayfield 2006-01-10 14:06:18 UTC
Description of problem:

LVM2 tools scan and use physical paths even after mpio is set up.

Version-Release number of selected component (if applicable):

RHEL 4 U3 Beta

How reproducible:

Always

Steps to Reproduce:
1. Set up device-mapper-multipath
2. Create lvm volume on multipath device
3. run any lvm command that scans (e.g. vgdisplay)
  
Actual results:

[root@clu1 ~]# vgdisplay
  Found duplicate PV tExTG5xhMixAeJF3xsAmTb2mtciOwU0Y: using /dev/sde not /dev/sdb
  Found duplicate PV u8Phs1yb0Cx2xJhiUSG1P27YmF5ILIJH: using /dev/sdg not /dev/sdd

Expected results:

No errors

Additional info:

There are several ways to solve this.  One would be to change LVM scanning
functions to scan dm devices first, and ignore subsequent duplicate PVs found on
the physical paths.

Another way would be for the device-mapper-multipath tools to add a filter entry
in lvm.conf to ignore the devices that are configured when multipath is first run.

Comment 1 Alasdair Kergon 2006-01-10 14:14:21 UTC
Please supply:
  lvm.conf file
  output of 'lvm version'
  output of 'vgscan -vvvv'


Comment 2 Alasdair Kergon 2006-01-10 14:15:47 UTC
and also
  output of 'dmsetup info -c' and 'dmsetup table'

(to show the multipath config)


Comment 3 Alasdair Kergon 2006-01-10 14:31:37 UTC
(my suspicion is that it's just the error message that needs fixing, but the
code is actually doing the right thing)

Comment 4 Rod Nayfield 2006-01-10 14:55:32 UTC
turns out that this might only be an issue when the LUN already has the LVM
volume.  For example, reinstalling the OS on the server.

So what is probably happening is that the system scans (at boot) the physical
paths.  Later, the user logs in and configures multipathing.  So in theory, a
reboot might solve this.  

I am testing now (reinstalling).  

Comment 5 Rod Nayfield 2006-01-10 15:29:38 UTC
Ok so the issue is relatively minor.  Only happens when multipath is not set up
at boot, and then gets set up.  Reboot fixes it.

Is there a way to fix this short of a reboot?

Comment 6 Alasdair Kergon 2006-01-10 15:38:42 UTC
Without the diagnostics I asked for, I still don't know what the problem is.

Comment 7 Alasdair Kergon 2006-01-10 15:41:45 UTC
i.e. I don't know if the tools were or were not correct in displaying those
error messages.