summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-09-20 09:27:33 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2014-09-20 09:27:58 +0400
commita58e7bac109e770c7a6c411d69cce95be02c0e17 (patch)
treefd776189206b8e313477c37726fe50bfdf8a8c7a /debian
parentb0c161ab4a878e5c639823908cf2b224b56c1904 (diff)
create /etc/modprobe.d/mdadm.conf
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/initramfs/script.local-top3
-rw-r--r--debian/mdadm.modules8
-rwxr-xr-xdebian/rules2
4 files changed, 12 insertions, 3 deletions
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 <mjt@tls.msk.ru> 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