Skip to contentSkip to conversation

Fixup kpartx rules for dmraid

PATCH In review Hannes Reinecke 2 participants 4 messages Aug 6, 2007 – Aug 9, 2007 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixup kpartx rules for dmraid

Hi Christophe,

the kpartx rules do not detect dmraid properly. This patch fixes this.

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

[kpartx] Fix udev rules for dmraid

The kpartx_id program is located under /lib/udev, so we don't need to call it with the full pathname.
And we should also create persistent links for dmraid tables.

kpartx/kpartx.rules +2 -2
index f32c718..9ab9a49 100644
@@ -9,7 +9,7 @@ ACTION=="remove", GOTO="kpartx_end"
 
 ENV{DM_TABLE_STATE}!="LIVE", GOTO="kpartx_end"
 
-ENV{DM_UUID}=="?*", IMPORT{program}=="/lib/udev/kpartx_id %M %m $env{DM_UUID}"
+ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"
 
 OPTIONS="link_priority=50"
 
@@ -18,7 +18,7 @@ ENV{DM_UUID}=="mpath-*", \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
 
 # Create persistent links for dmraid tables
-ENV{DM_UUID}=="mpath-*", \
+ENV{DM_UUID}=="dmraid-*", \
         SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
 
 # Create persistent links for partitions
#1 lore raw

kpartx/kpartx.rules ACTION=="remove", GOTO="kpartx_end" · line 12

Quoted 2 lines · Hannes Reinecke
kpartx/kpartx.rules +1 -1
-ENV{DM_UUID}=="?*", IMPORT{program}=="/lib/udev/kpartx_id %M %m $env{DM_UUID}"
+ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"

/lib/udev/kpartx_id isn't in $PATH. This patch breaks the udev rule. Cheers,
-- Guido>

#2 lore raw
Quoted 4 lines · Guido Guenther

kpartx/kpartx.rules ACTION=="remove", GOTO="kpartx_end" · line 12

Quoted 2 lines · Hannes Reinecke
kpartx/kpartx.rules +1 -1
-ENV{DM_UUID}=="?*", IMPORT{program}=="/lib/udev/kpartx_id %M %m $env{DM_UUID}"
+ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"

/lib/udev/kpartx_id isn't in $PATH. This patch breaks the udev rule.

And /lib/udev is the standard path prefix since udev-0.89.

So?

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
#3 lore raw
Quoted 7 lines · Hannes Reinecke
Quoted 4 lines · Guido Guenther

kpartx/kpartx.rules ACTION=="remove", GOTO="kpartx_end" · line 12

Quoted 2 lines · Hannes Reinecke
kpartx/kpartx.rules +1 -1
-ENV{DM_UUID}=="?*", IMPORT{program}=="/lib/udev/kpartx_id %M %m $env{DM_UUID}"
+ENV{DM_UUID}=="?*", IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"

/lib/udev/kpartx_id isn't in $PATH. This patch breaks the udev rule.

And /lib/udev is the standard path prefix since udev-0.89.

Ahh...right, IMPORT prefixes with /lib/udev, didn't know that, but it's actually in the changelog. Sorry.
-- Guido