]> git.ipfire.org Git - thirdparty/mdadm.git/blame - systemd/mdmon@.service
mdmon: Improve switchroot interactions.
[thirdparty/mdadm.git] / systemd / mdmon@.service
CommitLineData
0f7bdf89
JS
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
8[Unit]
723d1df4 9Description=MD Metadata Monitor on %I
0f7bdf89
JS
10DefaultDependencies=no
11Before=initrd-switch-root.target
ea109700 12Documentation=man:mdmon(8)
0f9a4b3e
N
13# Allow mdmon to keep running after switchroot, until a new
14# instance is started.
15IgnoreOnIsolate=true
0f7bdf89
JS
16
17[Service]
67ee2383
N
18# mdmon should never complain due to lack of a platform,
19# that is mdadm's job if at all.
20Environment=IMSM_NO_PLATFORM=1
8d1d32bb
N
21# The mdmon starting in the initramfs (with dracut at least)
22# cannot see sysfs after root is mounted, so we will have to
23# 'takeover'. As the '--offroot --takeover' don't hurt when
24# not necessary, are are useful with root-on-md in dracut,
25# have them always present.
6660e33e 26ExecStart=BINDIR/mdmon --foreground --offroot --takeover %I
8d1d32bb
N
27# Don't set the PIDFile. It isn't necessary (systemd can work
28# it out) and systemd will remove it when transitioning from
29# initramfs to rootfs.
30#PIDFile=/run/mdadm/%I.pid
0f9a4b3e
N
31# The default slice is system-mdmon.slice which Conflicts
32# with shutdown, causing mdmon to exit early. So use system.slice.
33Slice=system.slice