diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2017-10-10 11:45:00 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2017-10-10 12:02:52 +0100 |
commit | e886c48592f24f6a332f6c560ade7a9dde1cddb3 (patch) | |
tree | 97cb630b1dfbacef5883ec8b0544dd5d1246f780 /debian | |
parent | 06792df134ffd54c33e2b83b5daf92f5eb3dfee2 (diff) |
Ship mdadm-shutdown.service and suggest dracut-core.
Users of systemd with rootfs on Intel Matrix Raid and DDF external
metadata-raid arrays that require mdmon monitoring, may wish to
install dracut-core package and enable mdadm-shutdown.service. This
will create a shutdown initramfs, that systemd-shutdown can pivot
to. This may result in an improved shutdown behaviour with less hangs
and synced raid arrays. The generated initramfs will takeover mdmon
monitoring, wait for the arrays to be clean before stopping them and
unmounting everything and finally executing requested shutdown
command.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 14 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/mdadm-shutdown.service | 20 | ||||
-rwxr-xr-x | debian/rules | 1 |
4 files changed, 36 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 7dad63ad..566a9a04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +mdadm (4.0-2) unstable; urgency=medium + + * Ship mdadm-shutdown.service and suggest dracut-core. Users of systemd + with rootfs on Intel Matrix Raid and DDF external metadata-raid arrays + that require mdmon monitoring, may wish to install dracut-core package + and enable mdadm-shutdown.service. This will create a shutdown + initramfs, that systemd-shutdown can pivot to. This may result in an + improved shutdown behaviour with less hangs and synced raid + arrays. The generated initramfs will takeover mdmon monitoring, wait + for the arrays to be clean before stopping them and unmounting + everything and finally executing requested shutdown command. + + -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 10 Oct 2017 11:55:52 +0100 + mdadm (4.0-1) unstable; urgency=medium * New upstream release. LP: #1668128 diff --git a/debian/control b/debian/control index df66b9ad..41dfdc8d 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Package: mdadm Architecture: linux-any Depends: ${shlibs:Depends}, udev, ${misc:Depends}, lsb-base, debconf Recommends: ${mta:Recommends}, kmod | module-init-tools -Suggests: ${mta:Suggests} +Suggests: ${mta:Suggests}, dracut-core Description: tool to administer Linux MD arrays (software RAID) The mdadm utility can be used to create, manage, and monitor MD (multi-disk) arrays for software RAID or multipath I/O. diff --git a/debian/mdadm-shutdown.service b/debian/mdadm-shutdown.service new file mode 100644 index 00000000..59762c8f --- /dev/null +++ b/debian/mdadm-shutdown.service @@ -0,0 +1,20 @@ +[Unit] +Description=Prepare mdadm shutdown initramfs +ConditionFileIsExecutable=/usr/bin/dracut +After=local-fs.target boot.mount boot.automount +Wants=local-fs.target +Conflicts=shutdown.target umount.target +DefaultDependencies=no + +[Service] +RemainAfterExit=yes +Type=oneshot +ExecStart=/bin/true +ExecStop=/bin/mount -o remount,exec,suid /run +ExecStop=/bin/mkdir -p /run/initramfs +ExecStop=/usr/bin/dracut --no-compress --no-kernel --quiet --force --force-add "shutdown mdraid" --omit "caps" /run/initramfs/shutdown.cpio +ExecStop=/bin/sh -c 'cd /run/initramfs; cpio -id --quiet < shutdown.cpio' +ExecStop=/bin/rm /run/initramfs/shutdown.cpio + +[Install] +WantedBy=sysinit.target diff --git a/debian/rules b/debian/rules index 1ed970a9..b13f218a 100755 --- a/debian/rules +++ b/debian/rules @@ -67,6 +67,7 @@ install-arch: build-arch install -Dm0755 udeb/mdadm $(DESTDIR_UDEB)/sbin/mdadm install -Dm0755 udeb/mdmon $(DESTDIR_UDEB)/sbin/mdmon install -Dm0644 udev-md-raid-arrays.rules $(DESTDIR_UDEB)/lib/udev/rules.d/63-md-raid-arrays.rules + install -Dm0644 debian/mdadm-shutdown.service $(DESTDIR)/lib/systemd/system/mdadm-shutdown.service ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes) install -Dm0644 udev-md-raid-assembly.rules $(DESTDIR_UDEB)/lib/udev/rules.d/64-md-raid-assembly.rules install -Dm0644 debian/source_mdadm.py $(DESTDIR)/usr/share/apport/package-hooks/source_mdadm.py |