summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2016-07-27 11:09:07 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2016-07-27 11:09:07 +0100
commit3ce6b68480adeefc99203a8b7143bd7c067ef36c (patch)
tree2dc83bae214f6057f4bb2d3a96f49ce3349b6a5a /debian
parent99fa33af992a671e08d4a69eac72ad2d262089d1 (diff)
Fix regressions from 3.4-2.
* Fix UUID= grep for configured RAIDs to be case incesetive, regression from 3.4-2. * Re-trigger block devices at the start of local-block mdadm loop, to re-incrementally assemble disks that appeared before RAID personalities were registered with the kernel. * Also, invoke non-incremental assembly of raid arrays in the local-block loop to support running mdadm with user-exported variables specified via param.conf. * Closes: #830770, #830300.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog16
-rw-r--r--debian/initramfs/hook2
-rw-r--r--debian/initramfs/script.local-block19
3 files changed, 35 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index f843ff8a..2983e0e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+mdadm (3.4-3) unstable; urgency=high
+
+ * Fix UUID= grep for configured RAIDs to be case incesetive, regression from 3.4-2.
+
+ * Re-trigger block devices at the start of local-block mdadm loop, to
+ re-incrementally assemble disks that appeared before RAID
+ personalities were registered with the kernel.
+
+ * Also, invoke non-incremental assembly of raid arrays in the
+ local-block loop to support running mdadm with user-exported variables
+ specified via param.conf.
+
+ * Closes: #830770, #830300.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 26 Jul 2016 17:09:54 +0100
+
mdadm (3.4-2) unstable; urgency=low
* Reneable incremental assembly
diff --git a/debian/initramfs/hook b/debian/initramfs/hook
index ae7d4d18..4e94c204 100644
--- a/debian/initramfs/hook
+++ b/debian/initramfs/hook
@@ -98,7 +98,7 @@ else
# make sure the configuration file knows about all running devices
/sbin/mdadm --detail --scan | while read array device params; do
uuid=${params#*UUID=}; uuid=${uuid%% *}
- if ! grep -q "UUID=$uuid" $DESTMDADMCONF; then
+ if ! grep -qi "UUID=$uuid" $DESTMDADMCONF; then
warn "the array $device with UUID $uuid"
warn "is currently active, but it is not listed in mdadm.conf. if"
warn "it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!"
diff --git a/debian/initramfs/script.local-block b/debian/initramfs/script.local-block
index e9b47c3d..214f24c7 100644
--- a/debian/initramfs/script.local-block
+++ b/debian/initramfs/script.local-block
@@ -15,12 +15,20 @@ prereqs)
;;
esac
+. /scripts/functions
+
# Poor man's mdadm-last-resort@.timer
# That kicks in 2/3rds into the ROOTDELAY
if [ ! -f /run/count.mdadm.initrd ]
then
COUNT=0
+
+ # Unfortunately raid personalities can be registered _after_ block
+ # devices have already been added, and their rules processed, try
+ # triggering again. See #830770
+ udevadm trigger --action=add -s block || true
+ wait_for_udev 10
else
COUNT=$(cat /run/count.mdadm.initrd)
fi
@@ -28,6 +36,11 @@ COUNT=$((COUNT + 1))
echo $COUNT > /run/count.mdadm.initrd
+# Run pure assemble command, even though we default to incremental
+# assembly it is supported for users to export variables via
+# param.conf such as IMSM_NO_PLATFORM. See #830300
+mdadm -q --assemble --scan --no-degraded || true
+
MAX=30
if [ ${ROOTDELAY:-0} -gt $MAX ]; then
MAX=$ROOTDELAY
@@ -36,8 +49,12 @@ MAX=$((MAX*2/3))
if [ "$COUNT" = "$MAX" ]
then
- # Poor man's mdadm-last-resort@.service
+ # Poor man's mdadm-last-resort@.service for incremental devices
mdadm -q --run /dev/md?*
+
+ # And last try for all others
+ mdadm -q --assemble --scan --run
+
rm -f /run/count.mdadm.initrd
fi