|
Harald Hoyer |
55891e |
From e3e5128cf20660c0789f9b4e2285dbc1f35f6799 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
55891e |
From: Michal Soltys <soltys@ziu.info>
|
|
Harald Hoyer |
55891e |
Date: Tue, 6 Sep 2011 00:17:23 +0200
|
|
Harald Hoyer |
55891e |
Subject: [PATCH] 90mdraid: adjust stock mdadm udev rules
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
Currently shipped mdadm rules incrementally assemble all imsm and native
|
|
Harald Hoyer |
55891e |
raids, and do so unconditionally. This causes few issues:
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
- fine-grained controls in 65-md* are shadowed - for example,
|
|
Harald Hoyer |
55891e |
mdadm.conf's presence tests or uuid checks
|
|
Harald Hoyer |
55891e |
- 90dmraid might also conflict with 90mdraid, if user prefers the former
|
|
Harald Hoyer |
55891e |
to handle containers
|
|
Harald Hoyer |
55891e |
- possibly other subtle issues
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
This patch adjusts the behaviour.
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
Signed-off-by: Michal Soltys <soltys@ziu.info>
|
|
Harald Hoyer |
55891e |
---
|
|
Harald Hoyer |
55891e |
modules.d/90mdraid/module-setup.sh | 5 +++++
|
|
Harald Hoyer |
55891e |
1 files changed, 5 insertions(+), 0 deletions(-)
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
|
|
Harald Hoyer |
55891e |
index de7785d..91a0769 100755
|
|
Harald Hoyer |
55891e |
--- a/modules.d/90mdraid/module-setup.sh
|
|
Harald Hoyer |
55891e |
+++ b/modules.d/90mdraid/module-setup.sh
|
|
Harald Hoyer |
55891e |
@@ -50,6 +50,11 @@ install() {
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
if [ ! -x /lib/udev/vol_id ]; then
|
|
Harald Hoyer |
55891e |
inst_rules 64-md-raid.rules
|
|
Harald Hoyer |
55891e |
+ # remove incremental assembly from stock rules, so they don't shadow
|
|
Harald Hoyer |
55891e |
+ # 65-md-inc*.rules and its fine-grained controls, or cause other problems
|
|
Harald Hoyer |
55891e |
+ # when we explicitly don't want certain components to be incrementally
|
|
Harald Hoyer |
55891e |
+ # assembled
|
|
Harald Hoyer |
55891e |
+ sed -i -e '/^ENV{ID_FS_TYPE}==.*ACTION=="add".*RUN+="\/sbin\/mdadm --incremental $env{DEVNAME}"$/d' "${initdir}/lib/udev/rules.d/64-md-raid.rules"
|
|
Harald Hoyer |
55891e |
fi
|
|
Harald Hoyer |
55891e |
|
|
Harald Hoyer |
55891e |
inst_rules "$moddir/65-md-incremental-imsm.rules"
|