chiark / gitweb /
rules: fix md rules for partitioned devices
authorMichal Soltys <nozo@ziu.info>
Wed, 27 Aug 2008 14:58:10 +0000 (16:58 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 27 Aug 2008 14:58:10 +0000 (16:58 +0200)
rules/packages/64-md-raid.rules

index d0510b3..02a3210 100644 (file)
@@ -11,8 +11,10 @@ KERNEL!="md*", GOTO="md_end"
 ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
 
 IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
-ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}"
-ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
+ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}"
+ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
+ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n"
+ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
 
 IMPORT{program}="vol_id --export $tempnode"
 OPTIONS+="link_priority=100"