From a58e7bac109e770c7a6c411d69cce95be02c0e17 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sat, 20 Sep 2014 09:27:33 +0400 Subject: create /etc/modprobe.d/mdadm.conf --- debian/changelog | 2 ++ debian/initramfs/script.local-top | 3 --- debian/mdadm.modules | 8 ++++++++ debian/rules | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 debian/mdadm.modules diff --git a/debian/changelog b/debian/changelog index 5328a5fa..2e24387a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ mdadm (3.3.2-1) UNRELEASED; urgency=low bring us array auto-assemble during initramfs run (Closes: #678691) * denote inability to initialize md subsystem in local-top script from fatal error to warning (Closes: #733574) + * create /etc/modprobe.d/mdadm.conf to set start_ro=1 there + instead of doing it in the initramfs -- Michael Tokarev Sat, 20 Sep 2014 08:49:59 +0400 diff --git a/debian/initramfs/script.local-top b/debian/initramfs/script.local-top index b95ad896..9450bb72 100644 --- a/debian/initramfs/script.local-top +++ b/debian/initramfs/script.local-top @@ -49,9 +49,6 @@ if [ ! -f /proc/mdstat ]; then exit 0 fi -# prevent writes/syncs so that resuming works (#415441). -echo 1 > /sys/module/md_mod/parameters/start_ro - # handle /dev/md/X nodes mkdir -p /dev/md diff --git a/debian/mdadm.modules b/debian/mdadm.modules new file mode 100644 index 00000000..5ad12499 --- /dev/null +++ b/debian/mdadm.modules @@ -0,0 +1,8 @@ +# mdadm module configuration file +# set start_ro=1 to make newly assembled arrays read-only initially, +# to prevent metadata writes. This is needed in order to allow +# resume-from-disk to work - new boot should not perform writes +# because it will be done behind the back of the system being +# resumed. See http://bugs.debian.org/415441 for details. + +options md_mod start_ro=1 diff --git a/debian/rules b/debian/rules index 769ea1b4..34872083 100755 --- a/debian/rules +++ b/debian/rules @@ -73,6 +73,8 @@ install: build $(INTERPOLATED_FILES) $(DESTDIR)/usr/share/initramfs-tools/hooks/mdadm install -m0755 debian/initramfs/script.local-top \ $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/mdadm + install -D -m0644 debian/mdadm.modules \ + $(DESTDIR)/etc/modprobe.d/mdadm.conf install -m0755 debian/mkconf $(DESTDIR)/usr/share/mdadm install -m0755 debian/checkarray $(DESTDIR)/usr/share/mdadm -- cgit v1.2.3