mdmon@.service 1.0 KB

12345678910111213141516171819202122232425262728
  1. # This file is part of mdadm.
  2. #
  3. # mdadm is free software; you can redistribute it and/or modify it
  4. # under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 2 of the License, or
  6. # (at your option) any later version.
  7. [Unit]
  8. Description=MD Metadata Monitor on /dev/%I
  9. DefaultDependencies=no
  10. Before=initrd-switch-root.target
  11. [Service]
  12. # mdmon should never complain due to lack of a platform,
  13. # that is mdadm's job if at all.
  14. Environment=IMSM_NO_PLATFORM=1
  15. # The mdmon starting in the initramfs (with dracut at least)
  16. # cannot see sysfs after root is mounted, so we will have to
  17. # 'takeover'. As the '--offroot --takeover' don't hurt when
  18. # not necessary, are are useful with root-on-md in dracut,
  19. # have them always present.
  20. ExecStart=/sbin/mdmon --offroot --takeover %I
  21. Type=forking
  22. # Don't set the PIDFile. It isn't necessary (systemd can work
  23. # it out) and systemd will remove it when transitioning from
  24. # initramfs to rootfs.
  25. #PIDFile=/run/mdadm/%I.pid
  26. KillMode=none