64-md-raid-assembly.rules 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # do not edit this file, it will be overwritten on update
  2. # Don't process any events if anaconda is running as anaconda brings up
  3. # raid devices manually
  4. ENV{ANACONDA}=="?*", GOTO="md_inc_end"
  5. # assemble md arrays
  6. SUBSYSTEM!="block", GOTO="md_inc_end"
  7. # skip non-initialized devices
  8. ENV{SYSTEMD_READY}=="0", GOTO="md_inc_end"
  9. # handle potential components of arrays (the ones supported by md)
  10. ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="md_inc"
  11. # "noiswmd" on kernel command line stops mdadm from handling
  12. # "isw" (aka IMSM - Intel RAID).
  13. # "nodmraid" on kernel command line stops mdadm from handling
  14. # "isw" or "ddf".
  15. IMPORT{cmdline}="noiswmd"
  16. IMPORT{cmdline}="nodmraid"
  17. ENV{nodmraid}=="?*", GOTO="md_inc_end"
  18. ENV{ID_FS_TYPE}=="ddf_raid_member", GOTO="md_inc"
  19. ENV{noiswmd}=="?*", GOTO="md_inc_end"
  20. ENV{ID_FS_TYPE}=="isw_raid_member", GOTO="md_inc"
  21. GOTO="md_inc_end"
  22. LABEL="md_inc"
  23. # remember you can limit what gets auto/incrementally assembled by
  24. # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
  25. ACTION=="add|change", IMPORT{program}="/sbin/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"
  26. ACTION=="add|change", ENV{MD_STARTED}=="*unsafe*", ENV{MD_FOREIGN}=="no", ENV{SYSTEMD_WANTS}+="mdadm-last-resort@$env{MD_DEVICE}.timer"
  27. ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
  28. ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
  29. LABEL="md_inc_end"