chiark / gitweb /
rules: md-raid.rules fix
[elogind.git] / rules / packages / 64-md-raid.rules
index def184f42c224ef04a7f5eb32398c3561e5fa265..4faf18c10635d197a119236cb082697148348015 100644 (file)
@@ -8,6 +8,9 @@ ACTION!="add|change", GOTO="md_end"
 # import data from a raid set
 KERNEL!="md*", GOTO="md_end"
 
+# partitions have no md/{array_state,metadata_version}
+ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
+
 # container devices have a metadata version of e.g. 'external:ddf' and
 # never leave state 'inactive'
 ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
@@ -26,6 +29,7 @@ ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNA
 
 IMPORT{program}="vol_id --export $tempnode"
 OPTIONS+="link_priority=100"
+OPTIONS+="watch"
 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"