Bug 1428637
| Summary: | LVM commands scan devices rejected by filter | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Nir Soffer <nsoffer> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | Default / Unclassified (RHEL6) | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | urgent | ||
| Priority: | unspecified | CC: | agk, gscott, heinzm, jbrassow, jentrena, mkalinin, msnitzer, prajnoha, prockai, teigland, zkabelac |
| Version: | 6.7 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-16 16:54:32 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1424853, 1429203 | ||
| Attachments: | |||
|
Description
Nir Soffer
2017-03-03 01:21:23 UTC
I just pasted the request into case 01797770. I'll keep the needs info turned on until we get output from them. - Greg Created attachment 1259746 [details]
Output of lvs command with -vvvv
This is the output of this command on rhel 6.7 system:
lvs -vvvv --config 'devices { filter = ["a|/dev/vda2|", "r|.*|"] }' vg0
The command ignores the filter, and opens many rejected devices:
# egrep "Open.+/dev/mapper" lvs--vvvv.out | head -10
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052761af2654a94a70a60a7ee3f RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052761af2654a94a70a60a7ee3f RO O_DIRECT
Forgot to mention that this was tested with # rpm -qa | grep lvm2 lvm2-2.02.118-2.el6.x86_64 lvm2-libs-2.02.118-2.el6.x86_64 Created attachment 1259748 [details]
Output of vgs -vvvv with a filter
This is the output of:
vgs -vvvv --config 'devices { filter = ["a|/dev/vda2|", "r|.*|"] }' vg0 > vgs--vvvv.out 2>&1
Same issue, opening rejected devices:
# egrep "Open.+/dev/mapper" vgs--vvvv.out | head -10
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052c81462a280847e8a6e3af8cd RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052a3e8afb36f74e72af6b7b03c RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052761af2654a94a70a60a7ee3f RO O_DIRECT
#device/dev-io.c:533 Opened /dev/mapper/360014052761af2654a94a70a60a7ee3f RO O_DIRECT
David, isn't this bug 1344206? Created attachment 1259814 [details]
Output of lvs command with -vvvv and a filter from user machine
This is the output of
lvs -vvvv \
--config 'devices { filter = ["a|/dev/mapper/3514f0c54f3a001a2|", "r|.*|"] }' \
475f3971-83e8-48d4-af55-957b84c5b42e > lvs--vvvv.out 2>&1
on user machine, showing the same results.
Created attachment 1259815 [details]
Output of lvs command with -vvvv and a filter from user machine
Created attachment 1259816 [details]
Output of vgs command with -vvvv and a filter from user machine
This is the output of
vgs -vvvv \
--config 'devices { filter = ["a|/dev/mapper/3514f0c54f3a001a2|", "r|.*|"] }' \
475f3971-83e8-48d4-af55-957b84c5b42e > vgs--vvvv.out 2>&1
On a user machine, showing the same results.
This seems to be fixed in rhel 6.8:
# lvs -vvvv --config 'devices { filter = ["a|/dev/vda2|", "r|.*|"] }' vg0 2>&1 | grep Open
#device/dev-io.c:559 Opened /dev/vda2 RO O_DIRECT
#device/dev-io.c:559 Opened /dev/vda2 RO O_DIRECT
#device/dev-io.c:559 Opened /dev/vda2 RO O_DIRECT
#device/dev-io.c:559 Opened /dev/vda2 RO O_DIRECT
#device/dev-io.c:559 Opened /etc/lvm/lvm.conf RO
# rpm -qa | grep lvm2
lvm2-2.02.143-7.el6.x86_64
lvm2-libs-2.02.143-7.el6.x86_64
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
Customers affected by this should upgrade to 6.8 or 7.3.
(In reply to Nir Soffer from comment #9) > David, isn't this bug 1344206? Yes This looks like a duplicate of 1344206 - it does not include this patch:
commit b77497cbd86a854add3ffa4ce09a35f165c0d2ba
Author: Peter Rajnoha <prajnoha>
Date: Tue Sep 8 15:03:15 2015 +0200
filters: make sure regex filter is evaluated before any filter that needs disk access
|