lvm.conf: devices { preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/md4", "/dev/sda4" ] filter = [ "r|/dev/nbd.*|", "r|^/dev/sd[bc]|" ] sysfs_scan = 1 multipath_component_detection = 1 md_component_detection = 1 md_chunk_alignment = 1 } without lvmetad: # lvs -a -o lv_name,vg_name,lv_attr,lv_size,devices LV VG Attr LSize Devices backup vg -wi-a----- 200.00g /dev/sda4(26761) code vg -wi-ao--p- 30.00g /dev/md4(0) dale_tmp vg -wi-a----- 300.00g /dev/sda4(583561) ebook vg -wi-a----- 75.00g /dev/sda4(564361) home vg -wi-ao---- 550.00g /dev/sda4(660361) home_gentoo vg -wi-ao---- 400.00g /dev/sda4(77961) home_mp3 vg -wi-ao---- 1.27t /dev/sda4(180361) laura vg -wi-ao---- 65.00g /dev/sda4(0) m-laptop-vista-backup vg -wi-a----- 20.00g /dev/sda4(16640) opt vg -wi-ao--p- 10.00g /dev/md4(7680) [pvmove0] vg vwC---v--- 4.00m root vg -wi-ao--p- 10.00g /dev/md4(34560) susan-backup vg -wi-a----- 200.00g /dev/sda4(513161) tmp vg -wi-ao--p- 10.00g /dev/md4(32000) usr vg -wi-ao--p- 35.00g /dev/md4(10240) usr_lib_debug vg -wi-ao--p- 20.00g /dev/md4(26880) usr_src vg -wi-ao--p- 5.00g /dev/md4(19200) usr_src2 vg -wi-----p- 10.00g /dev/md4(37120) var vg -wi-ao--p- 25.00g /dev/md4(20480) vm1 vg -wi-ao--p- 5.00g /dev/md4(42240) vm2 vg -wi-ao--p- 5.00g /dev/md4(43520) vm3 vg -wi-ao--p- 5.00g /dev/md4(44800) vm4 vg -wi-ao--p- 5.00g /dev/md4(46080) with lvmetad: # lvs -a -o lv_name,vg_name,lv_attr,lv_size,devices Found duplicate PV PQ6Sc05axd6gVPjRVExfJelEq73yQnXs: using /dev/sdb4 not /dev/md4 Found duplicate PV PQ6Sc05axd6gVPjRVExfJelEq73yQnXs: using /dev/sdc4 not /dev/sdb4 /dev/sdd: open failed: No medium found /dev/sde: open failed: No medium found /dev/sdf: open failed: No medium found No device found for PV PQ6Sc0-5axd-6gVP-jRVE-xfJe-lEq7-3yQnXs. No device found for PV PQ6Sc0-5axd-6gVP-jRVE-xfJe-lEq7-3yQnXs. LV VG Attr LSize Devices backup vg -wi-a----- 200.00g /dev/sda4(26761) code vg -wi-ao--p- 30.00g /dev/sdc4(0) dale_tmp vg -wi-a----- 300.00g /dev/sda4(583561) ebook vg -wi-a----- 75.00g /dev/sda4(564361) home vg -wi-ao---- 550.00g /dev/sda4(660361) home_gentoo vg -wi-ao---- 400.00g /dev/sda4(77961) home_mp3 vg -wi-ao---- 1.27t /dev/sda4(180361) laura vg -wi-ao---- 65.00g /dev/sda4(0) m-laptop-vista-backup vg -wi-a----- 20.00g /dev/sda4(16640) opt vg -wi-ao--p- 10.00g /dev/sdc4(7680) [pvmove0] vg vwC---v--- 4.00m root vg -wi-ao--p- 10.00g /dev/sdc4(34560) susan-backup vg -wi-a----- 200.00g /dev/sda4(513161) tmp vg -wi-ao--p- 10.00g /dev/sdc4(32000) usr vg -wi-ao--p- 35.00g /dev/sdc4(10240) usr_lib_debug vg -wi-ao--p- 20.00g /dev/sdc4(26880) usr_src vg -wi-ao--p- 5.00g /dev/sdc4(19200) usr_src2 vg -wi-----p- 10.00g /dev/sdc4(37120) var vg -wi-ao--p- 25.00g /dev/sdc4(20480) vm1 vg -wi-ao--p- 5.00g /dev/sdc4(42240) vm2 vg -wi-ao--p- 5.00g /dev/sdc4(43520) vm3 vg -wi-ao--p- 5.00g /dev/sdc4(44800) vm4 vg -wi-ao--p- 5.00g /dev/sdc4(46080) # lvs -a -o lv_name,vg_name,lv_attr,lv_size,devices No device found for PV PQ6Sc0-5axd-6gVP-jRVE-xfJe-lEq7-3yQnXs. No device found for PV PQ6Sc0-5axd-6gVP-jRVE-xfJe-lEq7-3yQnXs. LV VG Attr LSize Devices backup vg -wi-a----- 200.00g /dev/sda4(26761) code vg -wi-ao--p- 30.00g unknown device(0) dale_tmp vg -wi-a----- 300.00g /dev/sda4(583561) ebook vg -wi-a----- 75.00g /dev/sda4(564361) home vg -wi-ao---- 550.00g /dev/sda4(660361) home_gentoo vg -wi-ao---- 400.00g /dev/sda4(77961) home_mp3 vg -wi-ao---- 1.27t /dev/sda4(180361) laura vg -wi-ao---- 65.00g /dev/sda4(0) m-laptop-vista-backup vg -wi-a----- 20.00g /dev/sda4(16640) opt vg -wi-ao--p- 10.00g unknown device(7680) [pvmove0] vg vwC---v--- 4.00m root vg -wi-ao--p- 10.00g unknown device(34560) susan-backup vg -wi-a----- 200.00g /dev/sda4(513161) tmp vg -wi-ao--p- 10.00g unknown device(32000) usr vg -wi-ao--p- 35.00g unknown device(10240) usr_lib_debug vg -wi-ao--p- 20.00g unknown device(26880) usr_src vg -wi-ao--p- 5.00g unknown device(19200) usr_src2 vg -wi-----p- 10.00g unknown device(37120) var vg -wi-ao--p- 25.00g unknown device(20480) vm1 vg -wi-ao--p- 5.00g unknown device(42240) vm2 vg -wi-ao--p- 5.00g unknown device(43520) vm3 vg -wi-ao--p- 5.00g unknown device(44800) vm4 vg -wi-ao--p- 5.00g unknown device(46080)
# pvs PV VG Fmt Attr PSize PFree /dev/md4 vg lvm2 a-m 465.38g 290.38g /dev/sda4 vg lvm2 a-- 3.64t 614.89g # lvcreate -n vm1.tmp -L 1g vg Cannot change VG vg while PVs are missing. Consider vgreduce --removemissing. # pvs -a PV VG Fmt Attr PSize PFree /dev/dm-0 --- 0 0 /dev/dm-1 --- 0 0 /dev/dm-13 --- 0 0 /dev/dm-14 --- 0 0 /dev/dm-15 --- 0 0 /dev/dm-16 --- 0 0 /dev/dm-18 --- 0 0 /dev/dm-19 --- 0 0 /dev/dm-2 --- 0 0 /dev/dm-20 --- 0 0 /dev/dm-21 --- 0 0 /dev/dm-3 --- 0 0 /dev/dm-4 --- 0 0 /dev/dm-5 --- 0 0 /dev/dm-6 --- 0 0 /dev/dm-9 --- 0 0 /dev/md2 --- 0 0 /dev/md3 --- 0 0 /dev/md4 vg lvm2 a-m 465.38g 290.38g /dev/sda1 --- 0 0 /dev/sda4 vg lvm2 a-- 3.64t 614.89g /dev/vg/backup --- 0 0 /dev/vg/dale_tmp --- 0 0 /dev/vg/ebook --- 0 0 /dev/vg/m-laptop-vista-backup --- 0 0 /dev/vg/susan-backup --- 0 0
I'm concerned that my system is now unbootable. # lvchange -ay vg/root Refusing activation of partial LV root. Use --partial to override. # lvdisplay --maps vg/root --- Logical volume --- LV Path /dev/vg/root LV Name root VG Name vg LV UUID rAHQ5C-aAKX-n559-XA0F-YCYz-ooOt-v080bv LV Write Access read/write LV Creation host, time bohr-int, 2013-11-01 17:21:45 -0700 LV Status available # open 1 LV Size 10.00 GiB Current LE 2560 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:16 --- Segments --- Logical extent 0 to 2559: Type linear Physical volume /dev/md4 Physical extents 34560 to 37119
Created attachment 369964 [details] pvscan --cache -vvvv
Created attachment 369966 [details] pvscan -vvvv (without lvmetad running)
From the default lvm.conf: # Since "filter" is often overridden from command line, it is not suitable # for system-wide device filtering (udev rules, lvmetad). To hide devices # from LVM-specific udev processing and/or from lvmetad, you need to set # global_filter. The syntax is the same as for normal "filter" # above. Devices that fail the global_filter are not even opened by LVM.
(In reply to Alexander Tsoy from comment #5) > From the default lvm.conf: > # Since "filter" is often overridden from command line, it is not > suitable > # for system-wide device filtering (udev rules, lvmetad). To hide devices > # from LVM-specific udev processing and/or from lvmetad, you need to set > # global_filter. The syntax is the same as for normal "filter" > # above. Devices that fail the global_filter are not even opened by LVM. Alexandar: since I followed up with agk, if I remove all filter options: preferred_names = [] filter = [] Then lvmetad STILL screws up the md component detection. If I force global_filter, I can get it scan just the correct devices manually, but md component detection really should work.
agk: did you pass it on to mornfall and figure out why lvmetad wasn't doing md component detection properly?
Yes, I mentioned it. There looks to be a problem with the way (non-regex) filters are being applied when using lvmetad.
*** Bug 503016 has been marked as a duplicate of this bug. ***
*** Bug 510660 has been marked as a duplicate of this bug. ***
In the bug #503016 (sys-fs/lvm2: remove lvmetad from initd "need") has been quite hastedly marked duplicate of this one. Let's say one doesn't want lvmetad to run on a server that is totally udev-less (if that doesn't make sense, feel free to comment), this server is still running lvmetad even if it's disabled in lvm.conf, as lvm init script pulls the lvmetad init script from the "need" section regardless. That seems pretty not desirable.
Robin: Have you rechecked this on a newer version?
I have been experiencing this with md as well and just checked against 2.0.2.145-r1, where it seems to be ok (lvs does not report inconsistencies)
(In reply to masc from comment #13) > I have been experiencing this with md as well and just checked against > 2.0.2.145-r1, where it seems to be ok (lvs does not report inconsistencies) Great. So that sounds like +1 to fixed in at least 145 and possibly sooner. The interesting thing would be if its fixed in the latest stable.
(In reply to Doug Goldstein from comment #14) > The interesting thing would be if its fixed in the latest stable. just checked, looks good to me with 2.02.116-r4 as well.
as a sidenote, while this issue seems to be resolved in 2.02.116-r4, I experienced breakage of libvirt after going back to stable. virDriverLoadModule:73 : failed to load module /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so /lib64/libdevmapper.so.1.02: version `DM_1_02_97' not found (required by /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so) thus reverted unstable again. maybe it's better to move forward.
(In reply to masc from comment #16) > as a sidenote, while this issue seems to be resolved in 2.02.116-r4, I > experienced breakage of libvirt after going back to stable. > > virDriverLoadModule:73 : failed to load module > /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so > /lib64/libdevmapper.so.1.02: version `DM_1_02_97' not found (required by > /usr/lib64/libvirt/connection-driver/libvirt_driver_storage.so) > > thus reverted unstable again. maybe it's better to move forward. I can see that happening if you move backwards in versions. Thanks for testing.