Description of problem: On RHEL4U3, /dev/mpath/<vgname>-<lvname> symlinks are generated that point to the same /dev/dm-* entry that the original /dev/mapper/<vgname>-<lvname> entries do. These seemingly benign symlinks create yet another special case for users to filter out/ignore. This /dev/mpath/... symlink generation is managed by the device-mapper-multipath's udev /etc/udev/rules.d/40-multipath.rules rule for linear DM targets; KERNEL="dm-[0-9]*", PROGRAM="dmsetup info -c --noheadings -j %M -m %m | grep -q .*:.*:.*:.*:.*:.*:.*:part[0-9]*-mpath-", PROGRAM="/sbin/dmsetup ls --target linear --exec basename -j %M -m %m", RESULT="?*", NAME="%k", SYMLINK="mpath/%c" The question is how does this udev rule even cause udev to generate /dev/mpath symlinks for linear DM entries that do NOT contain a UUID with: 'part[0-9]*-mpath-'? Version-Release number of selected component (if applicable): 0.4.5-12.0.RHEL4 How reproducible: Always Steps to Reproduce: 1. dmsetup ls ... | grep -q .*:.*:.*:.*:.*:.*:.*:part[0-9]*-mpath- doesn't yield a return status of 0 2. simply activate and deactivate a linear LV 3. the associated /dev/mpath/ entry will be created/removed Actual results: # ls -al /dev/dm-0 brw-r----- 1 root root 253, 0 Jul 18 11:05 /dev/dm-0 # dmsetup info -c --noheadings -j 253 -m 3 ivg19-ilv19:253:3:L--w:0:1:0:LVM-X1u5idqSqWPS72y3T5as4z6kt1PkMA746CVSt7STHEywsw9DR5BjduDLhZa6Inw2 # ls -al /dev/mpath/ivg21-ilv21 lrwxrwxrwx 1 root root 7 Jul 18 10:51 /dev/mpath/ivg21-ilv21 -> ../dm-0 # lvchange -an ivg21/ilv21 # ls -al /dev/mpath/ivg21-ilv21 ls: /dev/mpath/ivg21-ilv21: No such file or directory # lvchange -ay ivg21/ilv21 # ls -al /dev/mpath/ivg21-ilv21 lrwxrwxrwx 1 root root 7 Jul 18 10:55 /dev/mpath/ivg21-ilv21 -> ../dm-0 Expected results: One wouldn't expect Linear DM mappings to have mpath symlinks created simply because the device-mapper-multipath rpm is installed. Is there a udev bug lurking here? Why does this udev rule actually generate a symlink at all? Additional info:
FYI, here are the udev log entries in /var/log/messages that result when doing lvchange -an .... then lvchange -ay ... : Jul 18 12:16:22 lab14-248 udev[9731]: removing device node '/dev/dm-0' Jul 18 12:16:28 lab14-248 udev[9752]: configured rule in '/etc/udev/rules.d/40-multipath.rules' at line 4 applied, added symlink 'mpath/%c' Jul 18 12:16:28 lab14-248 udev[9752]: configured rule in '/etc/udev/rules.d/40-multipath.rules' at line 4 applied, 'dm-0' becomes '%k' Jul 18 12:16:28 lab14-248 udev[9752]: creating device node '/dev/dm-0'
This is already fixed in device-mapper-multipath-0.4.5-16.1.RHEL4