Bug 869254
| Summary: | /dev/mapper/mpathX is block device not symbolic link | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Peter Rajnoha <prajnoha> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.4 | CC: | agk, bmarzins, dwysocha, fdinitto, heinzm, jbrassow, lvm-team, msnitzer, nperic, prajnoha, prockai, thornber, xiaoli, zkabelac |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.98-2.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause:
libdevmapper incorrectly processed the udev synchronisation and device node management state if the udev synchronisation was disabled (--noudevsync option in dmsetup and --noudevsync or activation/udev_sync=0 lvm.conf option in LVM2) and at the same time we did not expect the verification of udev operations to be used (so not using --verifyudev in dmsetup and using activation/verify_udev_operations=0 LVM2 configuration option or libdevmapper users using DM_UDEV_DISABLE_LIBRARY_FALLBACK flag).
Consequence:
Disabling the udev synchronisation caused the udev verification to be always used, ignoring the actual state of using or not using the --verifyudev option in dmsetup or activation/verify_udev_operations configuration option in LVM2 or DM_UDEV_DISABLE_LIBRARY_FALLBACK flag. This ended up with libdevmapper/LVM2 to process the relevant nodes and symlinks in /dev and bypassing udev even if it was not desirable.
Fix:
The libdevmapper library has been fixed to honour the actual need for udev verification based on user's settings, not defaulting to always using it if udev synchronisation is off.
Result:
After the fix, the device nodes and symlinks in /dev are processed by udev if udev verification and udev synchronisation is not used at the same time.
|
Story Points: | --- |
| Clone Of: | 864368 | Environment: | |
| Last Closed: | 2013-02-21 08:14:37 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: | 864368, 872174 | ||
| Bug Blocks: | 869253 | ||
|
Description
Peter Rajnoha
2012-10-23 12:14:26 UTC
libdevmapper part fixed with this commit: http://git.fedorahosted.org/cgit/lvm2.git/commit/?id=a820a68619c10108666f8093545837233c954046 To QA: To test this issue, you can use the following sequence (just test bare dm device, not an mpath device): # dmsetup create test --table "0 1 zero" --noudevsync # ls -l /dev/mapper/ total 0 crw-------. 1 root root 10, 236 Oct 23 08:31 control brw-rw----. 1 root disk 253, 0 Oct 23 14:40 test --> "test" is a node, libdm should have let udev to make the symlink instead (despite the operation itself is not synced with udev, but udev should still make the /dev content, not libdm). Having the node in there *is not correct* (udev creates symlinks in /dev/mapper, libdm creates nodes - but it should do that ONLY if --verifyudev is used) After the patch applied - this is the *correct* behaviour: # dmsetup create test --table "0 1 zero" --noudevsync # ls -l /dev/mapper/ total 0 crw-------. 1 root root 10, 236 Oct 23 08:31 control lrwxrwxrwx. 1 root root 7 Oct 23 14:50 test -> ../dm-0 --> "test" is a symlink, no libdm fallback has been done and libdm did not touch any of the /dev content # dmsetup create test --table "0 1 zero" --noudevsync --noudevrules [0] rawhide/~ # ls -l /dev/mapper/ total 0 crw-------. 1 root root 10, 236 Oct 23 08:31 control --> *no* symlink nor any node created for "test" - we disabled udev rules and "udev verify" is disabled by default as well [0] rawhide/~ # dmsetup create test --table "0 1 zero" --noudevsync --noudevrules --verifyudev [0] rawhide/~ # ls -l /dev/mapper/ total 0 crw-------. 1 root root 10, 236 Oct 23 08:31 control brw-rw----. 1 root disk 253, 0 Oct 23 14:57 test --> "test" is a node - we disabled udev and we enabled "udev verify" - so the node has been created by libdm during "udev verify" Adding QA Ack based on comment #2, This bug will be marked verified once final 6.4 regression testing has been completed. (09:02:02) [root@r6-node01:/dev]$ dmsetup create test_dev --table "0 1 zero" --noudevsync (09:02:14) [root@r6-node01:/dev]$ ls tes* ls: cannot access tes*: No such file or directory (09:02:23) [root@r6-node01:/dev/mapper]$ ls -l te* lrwxrwxrwx. 1 root root 7 Jan 8 09:02 test_dev -> ../dm-2 (09:03:12) [root@r6-node01:/dev/mapper]$ dmsetup create test --table "0 1 zero" --noudevsync --noudevrules (09:03:15) [root@r6-node01:/dev/mapper]$ ls -l total 0 crw-rw----. 1 root root 10, 58 Jan 8 03:35 control (09:03:20) [root@r6-node01:/dev/mapper]$ cd .. (09:03:25) [root@r6-node01:/dev]$ ls -l te* ls: cannot access te*: No such file or directory No symlink or node created (09:07:16) [root@r6-node01:/dev]$ dmsetup create test_dev --table "0 1 zero" --noudevsync --noudevrules --verifyudev (09:08:22) [root@r6-node01:/dev]$ ls -l tes* ls: cannot access tes*: No such file or directory (09:08:26) [root@r6-node01:/dev]$ cd mapper/ (09:08:31) [root@r6-node01:/dev/mapper]$ ls -l tes* brw-rw----. 1 root disk 253, 3 Jan 8 09:08 test_dev The behavior is as expected and described in Comment #2 Verifying the symlink/node creation behavior with: lvm2-2.02.98-6.el6.x86_64 lvm2-devel-2.02.98-6.el6.x86_64 udev-147-2.43.el6.x86_64 device-mapper-1.02.77-6.el6.x86_64 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0501.html |