Bug 869253
| Summary: | /dev/mapper/mpathX is block device not symbolic link | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Peter Rajnoha <prajnoha> |
| Component: | device-mapper-multipath | Assignee: | Ben Marzinski <bmarzins> |
| Status: | CLOSED ERRATA | QA Contact: | Gris Ge <fge> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4 | CC: | agk, bdonahue, bmarzins, dwysocha, dyasny, fdinitto, fge, heinzm, lvm-team, msnitzer, prajnoha, prockai, xiaoli, zkabelac |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | device-mapper-multipath-0.4.9-62.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: multipathd and kpartx were not telling libdevmapper to skip doing device creation, and let udev do it.
Consequence: Sometimes libdevmapper would create a block device in /dev/mapper, and sometimes udev would create a symlink in /dev/mapper
Fix: multipathd and kpartx now tell libdevmapper to skip doing device creation
Result: udev will always create a symlink in /dev/mapper as expected.
|
Story Points: | --- |
| Clone Of: | 864368 | Environment: | |
| Last Closed: | 2013-02-21 10:57:42 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, 869254, 872174 | ||
| Bug Blocks: | |||
|
Description
Peter Rajnoha
2012-10-23 12:10:57 UTC
To test this, you need to make sure that multipathd creates the device through libdevmapper before udev can. You may simply be able to see this by running kpartx to create some partitions without using the "-s". It will be a lot easier to hit will selinux completely disabled. The other way to hit it is to start up multipathd, and then add a lot of devices all at once. You can probably use scsi_debug. You want to set up multipath devices with only one path, since otherwise adding the extra paths to the tables will give udev a chance to catch up. Again, disabling selinux will make this a lot easier to hit. You've reproduced it if you've got multipath creating devnodes instead of links in /dev/mapper/ steps to reproduce accordingly Ben's comments.
1. # dd if=/dev/zero of=disk.img bs=1M count=100
2. use "fdisk disk.img" to create a partition
3. # kpartx -av disk01
add map loop0p1 (253:1): 0 202752 linear /dev/loop0 2048
4. # ls /dev/mapper/ -l
===
brw-r--r-- 1 root root 253, 1 Oct 23 23:12 loop0p1
===
check if the loop0p1 is a node device.
5. if use "kpartx -asv disk01" will create the symbolic link.
Patch ported. multipathd and kpartx now use the DM_UDEV_DISABLE_LIBRARY_FLAG flag. (In reply to comment #2) > steps to reproduce accordingly Ben's comments. > > 1. # dd if=/dev/zero of=disk.img bs=1M count=100 > 2. # losetup /dev/loop10 disk.img > 3. # fdisk /dev/loop10 to create a partition > 4. # kpartx -av disk.img > add map loop0p1 (253:1): 0 202752 linear /dev/loop0 2048 > 5. # ls /dev/mapper/ -l > === > brw-r--r-- 1 root root 253, 1 Oct 23 23:12 loop0p1 > === > > check if the loop0p1 is a node device. > > 5. if use "kpartx -asv disk01" will create the symbolic link. This above steps are for RHEL7.0. updated them for RHEl 6.4 Test case created for this bug: /kernel/storage/multipath/symbolic_link_mpathx_BZ_869253 In RHEL 6.3, there are some block file in /dev/mapper folder for a short while. After udev finished, all file changed to link. In RHEL 6.4 (device-mapper-multipath-0.4.9-63.el6.x86_64) , no block file in /dev/mapper any more. VERIFY. 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-0458.html |