Bug 879304 - lvmetad starts by default if /etc/lvm/lvm.conf does NOT exist.
Summary: lvmetad starts by default if /etc/lvm/lvm.conf does NOT exist.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 18
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-22 15:00 UTC by Peter Rajnoha
Modified: 2012-12-01 09:50 UTC (History)
14 users (show)

Fixed In Version: lvm2-2.02.98-3.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of: 877256
Environment:
Last Closed: 2012-12-01 09:50:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Rajnoha 2012-11-22 15:00:25 UTC
+++ This bug was initially created as a clone of Bug #877256 +++

Description of problem:

I am installing OS to the multipath disk has LVM LVs. 
The LVM VG and LV are activated after udevd finds the block device. But the PV is not based on mpath node but on the sdX node.

I check the system then find the mpath node is not created and multipathd is not running. I check the system daemon find multipathd is not running but lvmetad is running. I think this is why the LVM node is created before mpath node.

This issue cause the anaconda hung and block the installation.

Version-Release number of selected component (if applicable):
lvm2-2.02.98-2.el7.x86_64
device-mapper-multipath-0.4.9-35.el7.x86_64
anaconda-18.29-1.el7.x86_64
kernel-3.6.0-0.29.el7.x86_64

How reproducible:
100%


Steps to Reproduce:
1. anaconda hung when install OS to the mpath node has LVM LVs( SAN boot testing )
2. check the program log and find the following error:

22:00:17,049 ERR program: dumpe2fs 1.42.6 (21-Sep-2012)
22:00:17,050 INFO program: Running... resize2fs -P /dev/loop1
22:00:17,093 INFO program: Couldn't find valid filesystem superblock.
22:00:17,093 ERR program: resize2fs 1.42.6 (21-Sep-2012)
22:00:17,093 ERR program: resize2fs: Device or resource busy while trying to open /dev/loop1
22:00:17,145 INFO program: Running... udevadm settle --timeout=300
22:00:17,167 INFO program: Running... multipath mpatha
22:00:17,242 INFO program: Nov 15 22:00:17 | mpatha: ignoring map
22:00:17,243 INFO program: Nov 15 22:00:17 | mpatha: ignoring map
22:00:17,243 INFO program: Nov 15 22:00:17 | mpatha: ignoring map
22:00:17,243 INFO program: Nov 15 22:00:17 | mpatha: ignoring map
22:00:17,244 INFO program: Running... udevadm settle --timeout=300
22:00:17,302 INFO program: Running... kpartx -a -s /dev/mapper/mpatha
22:00:17,331 INFO program: failed to stat() /dev/mapper/mpatha

3. go to the anaconda shell then find the mpath node is not created and the LVM uses the sdc2 as the PV.
[anaconda root@localhost ~]# multipath -ll
[anaconda root@localhost ~]# ls /dev/mapper/ -l
total 0
crw-------. 1 root root 10, 236 Nov 15 22:00 control
lrwxrwxrwx. 1 root root       7 Nov 15 22:00 live-rw -> ../dm-0
lrwxrwxrwx. 1 root root       7 Nov 15 22:00 rhel_storageqe--06-root -> ../dm-2
lrwxrwxrwx. 1 root root       7 Nov 15 22:00 rhel_storageqe--06-swap -> ../dm-1
[anaconda root@localhost ~]# pvs 
  PV         VG                Fmt  Attr PSize  PFree
  /dev/sdc2  rhel_storageqe-06 lvm2 a--  29.51g    0 
[anaconda root@localhost ~]# lvs
  LV   VG                Attr      LSize  Pool Origin Data%  Move Log Copy%  Convert
  root rhel_storageqe-06 -wi-a---- 25.60g                                           
  swap rhel_storageqe-06 -wi-a----  3.91g 

4. workaround
4.1 inactivate the LVM VG
# vgchange -an rhel_storageqe-06
4.2 run multipath again to create the mpath node
# multipath 
4.3 check the pvs, then find the LVM is using the mpath node
4.4 run anaconda again, it will start normally.
Actual results:


Expected results:


Additional info:

--- Additional comment from Xiaowei Li on 2012-11-16 04:48:06 CET ---

I am marking it as a blocker since most of our nodes are booting from SAN.

--- Additional comment from Xiaowei Li on 2012-11-16 05:01:07 CET ---

I have done some test to check if the LVM will be create before mpath node. The result prove it is.

# lvmetad is running and multipathd is not running
1. inactive the LVs and delete the mpath node.
2. delete the sdX node from sys
# echo 1 > /sys/block/sdX/device/delete
3. scan the scsi host
# echo '- - -' > /sys/class/scsi_host/hostX/scan
4. check the /dev/mapper, then only find the LVM node
5. run multipath, it said "mpatha: ignoring the map". this is because the LVM LV is opening the device.

--- Additional comment from Xiaowei Li on 2012-11-20 07:30:22 CET ---

I don't know why the lvmetad is running when perform OS installation. The /etc/lvm/lvm.conf is not here and 'lvm dumpconfig' return nothing.

I think lvmetad should be disabled/stopped since multipathd is not existing when perform OS installation.

--- Additional comment from Xiaowei Li on 2012-11-20 07:54:18 CET ---

I have checked the lvmetad.

When /etc/lvm/lvm.conf doesn't exist the lvmetad will be started. 
When /etc/lvm/lvm.conf exists and is not changed the lvmetad will not be started since the use_lvmetad is 0 in lvm.conf by default.

We should make sure the lvm2 has the same behavior with/without the default lvm.conf.

Comment 1 Fedora Update System 2012-11-22 15:21:26 UTC
lvm2-2.02.98-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lvm2-2.02.98-3.fc18

Comment 2 Fedora Update System 2012-11-22 18:47:08 UTC
Package lvm2-2.02.98-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lvm2-2.02.98-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18795/lvm2-2.02.98-3.fc18
then log in and leave karma (feedback).

Comment 3 Xiaowei Li 2012-11-23 02:43:30 UTC
passed with lvm2-2.02.98-3.fc18 
Thanks for the quick fix.

Comment 4 Fedora Update System 2012-12-01 09:50:18 UTC
lvm2-2.02.98-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.