Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308693 - sys-fs/multipath-tools: does not run kpartx to create partitions for multipath devices under /dev/mapper
Summary: sys-fs/multipath-tools: does not run kpartx to create partitions for multipat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://www.redhat.com/archives/dm-de...
Whiteboard:
Keywords:
: 581182 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-09 17:24 UTC by Marc-André Labonté
Modified: 2017-07-22 08:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
equery belongs kpartx.rules (equery.txt,201 bytes, text/plain)
2010-03-24 14:25 UTC, Marc-André Labonté
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Labonté 2010-03-09 17:24:14 UTC
I would expect partitions to appear under /dev/mapper as well as whole devices.

Reproducible: Always

Steps to Reproduce:
1. Create LUN on San, map it to gentoo box
2. Configure multipath, multipath -ll must show LUN
3. partition LUN, ex fdisk /dev/mapper/largeLUN
4. Reboot or otherwise have udev take care of the new LUN
5. ls /dev/mapper

Actual Results:  
me@gentoobox ~ $ ls -al /dev/mapper
total 0
drwxr-xr-x  2 root root     280 Mar  9 12:09 .
drwxr-xr-x 17 root root   34340 Mar  9 12:09 ..
brw-rw----  1 root disk 253,  0 Mar  9 12:09 largeLUN
brw-rw----  1 root disk 253,  1 Mar  9 12:09 reallyHugeLUN
lrwxrwxrwx  1 root root      16 Mar  9 12:06 control -> ../device-mapper


Expected Results:  
me@gentoobox ~ $ ls -al /dev/mapper
total 0
drwxr-xr-x  2 root root     280 Mar  9 12:09 .
drwxr-xr-x 17 root root   34340 Mar  9 12:09 ..
brw-rw----  1 root disk 253,  0 Mar  9 12:09 largeLUN
brw-rw----  1 root disk 253,  2 Mar  9 12:09 largeLUNp1
brw-rw----  1 root disk 253,  3 Mar  9 12:09 largeLUNp2
brw-rw----  1 root disk 253,  4 Mar  9 12:09 largeLUNp3
brw-rw----  1 root disk 253,  5 Mar  9 12:09 largeLUNp4
brw-rw----  1 root disk 253,  6 Mar  9 12:09 largeLUNp5
brw-rw----  1 root disk 253,  1 Mar  9 12:09 reallyHugeLUN
brw-rw----  1 root disk 253,  7 Mar  9 12:09 reallyHugeLUNp1
brw-rw----  1 root disk 253,  8 Mar  9 12:09 reallyHugeLUNp2
brw-rw----  1 root disk 253, 10 Mar  9 12:09 reallyHugeLUNp3
brw-rw----  1 root disk 253,  9 Mar  9 12:09 reallyHugeLUNp4
lrwxrwxrwx  1 root root      16 Mar  9 12:06 control -> ../device-mapper


I wrote a small patch which modifies /etc/udev/rules.d/66-kpartx.rules

It works for me but i don't know if it is the right way to do it

--- 66-kpartx.rules.orig	2010-03-09 11:41:17.000000000 -0500
+++ 66-kpartx.rules	2010-03-09 11:47:11.000000000 -0500
@@ -7,7 +7,7 @@
 KERNEL!="dm-*", GOTO="kpartx_end"
 ACTION=="remove", GOTO="kpartx_end"
 
-ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end"
+ENV{DM_TABLE_LIVE}!="1", GOTO="kpartx_end"
 
 ENV{DM_UUID}=="?*", IMPORT{program}=="/lib/udev/kpartx_id %M %m $env{DM_UUID}"
 
@@ -30,6 +30,8 @@
         RUN+="/sbin/kpartx -a -p -part /dev/$kernel"
 ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="dmraid-*", \
         RUN+="/sbin/kpartx -a -p -part /dev/$kernel"
+ENV{DM_UUID}=="mpath-*", \
+        RUN+="/sbin/kpartx -a /dev/mapper/$env{DM_NAME}"
 
 LABEL="kpartx_end"
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2010-03-24 13:58:07 UTC
emerge gentoolkit, then attach the output of "equery belongs /etc/udev/rules.d/66-kpartx.rules"
Comment 2 Marc-André Labonté 2010-03-24 14:25:56 UTC
Created attachment 225109 [details]
equery belongs kpartx.rules
Comment 3 Marc-André Labonté 2010-03-24 14:27:01 UTC
Comment on attachment 225109 [details]
equery belongs kpartx.rules

66-kpartx.rules belongs to multipath-tools-0.4.8-r2
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2010-03-24 14:58:52 UTC
Fixing the bug assignments
Comment 5 Alexey Shvetsov archtester gentoo-dev 2012-05-25 21:50:01 UTC
Does this bug still valid for 0.4.9?
Comment 6 pva 2016-04-26 07:20:23 UTC
*** Bug 581182 has been marked as a duplicate of this bug. ***
Comment 7 pva 2016-04-26 07:22:43 UTC
Yes, the problem still exists. See investigation in bug  #581182 and better solutions presented there. Please, reopen this one.
Comment 8 Alexey Shvetsov archtester gentoo-dev 2016-04-26 07:37:45 UTC
Reopened per Peter's request
Comment 9 SpanKY gentoo-dev 2016-05-11 04:52:17 UTC
looks like upstream has posted a fix now
Comment 10 SpanKY gentoo-dev 2016-05-11 04:53:36 UTC
nm, i thought i was reading the 2016 thread and not the old 2007 thread.  looks like upstream is poking the issue again though, so we could just wait a bit longer and see what shakes out.