X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=rules%2Fpackages%2F64-md-raid.rules;h=4faf18c10635d197a119236cb082697148348015;hb=9379b7c16dd3b2f11d9e69c063706037ae001a0a;hp=6fe4d46dc9741838ded6de63dae940aba87d32e6;hpb=e32135825f70ec1f1c449a9201a80917abe5d842;p=elogind.git diff --git a/rules/packages/64-md-raid.rules b/rules/packages/64-md-raid.rules index 6fe4d46dc..4faf18c10 100644 --- a/rules/packages/64-md-raid.rules +++ b/rules/packages/64-md-raid.rules @@ -8,9 +8,13 @@ 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" +TEST!="md/array_state", GOTO="md_end" ATTR{md/array_state}=="|clear|inactive", GOTO="md_end" LABEL="md_ignore_state" @@ -25,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}"