Bug 1044474 - The global_filter is not properly applied for lvm2-pvscan@.service - only major:minor pair should be used, not device path for the service's "pvscan --cache -aay" call
Summary: The global_filter is not properly applied for lvm2-pvscan@.service - only maj...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 20
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 11:47 UTC by Peter Rajnoha
Modified: 2013-12-24 03:42 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.103-5.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-24 03:42:38 UTC


Attachments (Terms of Use)

Description Peter Rajnoha 2013-12-18 11:47:42 UTC
The lvm2-pvscan@.service must use only "major:minor" for device reference, not /dev/block/major:minor (a path). Otherwise, the global_filter is not properly applied. This may end up with unexpected filtering of the devices that LVM should scan when someone has global_filter defined.

commit 359291b41cdeb1ca886e018aa44c67882da10252
Author: Peter Rajnoha <prajnoha@redhat.com>
Date:   Wed Dec 18 12:00:02 2013 +0100

    systemd: use only major:minor for pvscan in lvm2-pvscan@.service
    
    When using filters for the pvscan --cache (the global_filter),
    there's a difference between:
    
      pvscan --cache -aay /dev/block/<major>:<minor>
    
    and
    
      pvscan --cache -aay <major>:<minor> (or --major <major> --minor <minor>)
    
    In the first case, we need to be sure to have an exact matching line
    in the filter for the device to be used, no aliases are considered
    So for example even if we have accept rule for "/dev/sda" present,
    this won't apply for "/dev/block/8:0" even though it's the same device!
    This is because we're comparing the path used on command line directly
    with the path written in the rule.
    
    For the second one, any alias mentioned in the filter will apply
    as we're comparing the major and minor pair, not looking at actual
    device names - so any alias mentioned in the rules will suffice for
    the filtering rule to apply.
    
    For the global_filter to be properly used, we need to call the
    second one in the lvm2-pvscan@.service - nobody is able to tell
    what value of major:minor the kernel assignes next time, hence
    this bug makes the use of global_filter quite unusable!

(https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=359291b41cdeb1ca886e018aa44c67882da10252)

Comment 1 Fedora Update System 2013-12-18 12:08:07 UTC
lvm2-2.02.103-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/lvm2-2.02.103-5.fc20

Comment 2 Peter Rajnoha 2013-12-18 12:13:32 UTC
This bug may have caused the PVs to be incorrectly ignored (because of the global_filter use) while they were supposed to be visible and the LVM volumes may have ended up inactive while they were supposed to be activated.

Comment 3 Fedora Update System 2013-12-20 02:04:29 UTC
Package lvm2-2.02.103-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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.103-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23668/lvm2-2.02.103-5.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-12-24 03:42:38 UTC
lvm2-2.02.103-5.fc20 has been pushed to the Fedora 20 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.