]> git.ipfire.org Git - thirdparty/mdadm.git/commit
systemd: various fixes for boot with container-arrays.
authorNeilBrown <neilb@suse.de>
Tue, 8 Apr 2014 07:22:18 +0000 (17:22 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 8 Apr 2014 07:37:08 +0000 (17:37 +1000)
commit8d1d32bb33da1bd08a398d26f364b84e69ac7b41
treeafc391ed07e1659e8ee06905f8044de966a3927c
parentf43f5b32991c7f5a188940b00989c27f87feee81
systemd: various fixes for boot with container-arrays.

1/ Add systemd shutdown script to ensure DDF and IMSM are
   clean before we actually shutdown

2/ Get udev to tell systemd to run the mdmon@mdXXX.service
   units when a member array appears.

   If we boot off a member array (with dracut at least),
   the mdmon started in the initramfs will lose track of
   /sys etc, so we need to restart it.
   systemd will try to forget about it too (but not actually
   kill it because we said not to do this).
   Having udev tell it to start it will allow a new mdmon to
   run which can see /sys, and systemd will know about it.

3/ Always use --offroot and --takeover when starting mdmon with
   systemd
   --offroot is needed else shutdown will hang.
   --takeover is needed incase an mdmon was started earlier
   (e.g. in initramfs).
   Neither hurt if they aren't actually needed.

Signed-off-by: NeilBrown <neilb@suse.de>
Makefile
systemd/mdadm.shutdown [new file with mode: 0644]
systemd/mdmon@.service
udev-md-raid-arrays.rules