Bug 830883
Summary: | lvm2 not ignoring multipath managed iscsi volumes | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Christian Becker <dabecka> | ||||
Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2 | CC: | agk, bmr, dwysocha, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-06-12 09:14:07 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: | |||||||
Attachments: |
|
Description
Christian Becker
2012-06-11 15:01:18 UTC
Please could you post the filter configuration you are using? Depending on the style used it's possible that you are not filtering out some of the additional alias names that modern udev maintains for devices (e.g. the /dev/disk/by-* trees). Personally I do not recommend the style found in the documentation you reference (reject first, then accept) since it is vulnerable to these types of problems - it is normally more robust to accept only the patterns you do wish to use and to reject all others ("r|.*|"). The multipath_component_detection filter only works with active multipath devices (it will inspect the holders directories in sysfs for candidate devices to see if they are owned by a device-mapper device and then checks for the mpath UUID prefix). This means that if LVM is invoked before multipath devices have been set up it will be unable to detect that a path is part of a multipath device and will proceed to use it if the filter configuration would permit the device. My current filter is as follows: filter = [ "r/disk/", "r/sd.*/", "a/.*/" ] I also found a filter with the order you´ve described: filter = [ "a|/dev/sda.*|", "a|/dev/disk/by-id/.*|", "r|.*|" ] This seems to work for lvs,vgs and pvs. But you can´t use the /dev/mapper paths for physical volume creation. I think this could be easily fixed by adding /dev/mapper to the filter, but i can´t test it. From my test, the multipath_component_detection hat no effect at all, it wasn´t even included in the default config - i just found it on an older RHEL5 Machine not affected by this issue. Actually I'd expect that filter to have the same problem since it is accepting all disk symlinks in the /dev/disk/by-id tree (which normally includes all disks on the system). Do you have any custom udev rules in place on the system? I am not able to reproduce the behaviour you see with pvcreate - if I include "/dev/disk/by-id" in any accept clause I am able to create new labels on the device (which is the expected behaviour since the device node can be reached via that path). It sounds like there may be some further configuration problems on the system that need to be tracked down and addressed which could be better handled by raising a support case than via bugzilla. If you have active Red Hat Enterprise Linux entitlements for the affected systems please open a case via your support representative or using the online tools at the Red Hat customer portal: https://access.redhat.com/support/cases/new Created attachment 590987 [details]
/dev/disk/by-id listing
Thanks for your quick reply!
This is no bug for me anymore, because the second filter i posted fixes this issue - at least for me. But it seems as this is a error in the documentation.
The second filter is not checking the inactive disks, because they´re not in /dev/disk/by-id. I have just attached a listing of my /dev/disk/by-id/ tree, you can compare it with my multipath output from the initial post.
> Do you have any custom udev rules in place on the system?
No.
Regarding pvcreate, i think this i my fault. I *think* that it won´t work with /dev/mapper paths, but i haven´t tested it. It should definitely work with 'pvcreate /dev/disk/by-id/$foo' so this is expected and no issue at all.
As i previously noted, this is not a real issue, but i think someone should review the documentation regarding the lvm behavior in multipath environments as the documented filter is not working as expected.
Regards,
Christian
pvcreate works fine on /dev/mapper entries: # pvcreate /dev/mapper/datalunp4 Physical volume "/dev/mapper/datalunp4" successfully created As I said, I think you still have some outstanding problems in your environment if you are seeing strange behaviour like this but I'll close this NOTABUG now as I do not think that there is any defect here to be addressed. I have a draft documentation bug to explain the interaction of LVM filters with udev aliases in the multipath guide and will file that today. |