summaryrefslogtreecommitdiff
path: root/modules.d/90mdraid
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2011-09-06 00:17:23 +0200
committerHarald Hoyer <harald@redhat.com>2011-09-22 15:37:23 +0200
commite3e5128cf20660c0789f9b4e2285dbc1f35f6799 (patch)
tree80b1cdaf09499a5c26fdeb6baa3fd56cf3d5a3a0 /modules.d/90mdraid
parent6d385c7111c81fe730c1823b232d19e8d42f50d4 (diff)
downloaddracut-e3e5128cf20660c0789f9b4e2285dbc1f35f6799.tar.gz
dracut-e3e5128cf20660c0789f9b4e2285dbc1f35f6799.tar.bz2
dracut-e3e5128cf20660c0789f9b4e2285dbc1f35f6799.zip
90mdraid: adjust stock mdadm udev rules
Currently shipped mdadm rules incrementally assemble all imsm and native raids, and do so unconditionally. This causes few issues: - fine-grained controls in 65-md* are shadowed - for example, mdadm.conf's presence tests or uuid checks - 90dmraid might also conflict with 90mdraid, if user prefers the former to handle containers - possibly other subtle issues This patch adjusts the behaviour. Signed-off-by: Michal Soltys <soltys@ziu.info>
Diffstat (limited to 'modules.d/90mdraid')
-rwxr-xr-xmodules.d/90mdraid/module-setup.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index de7785db..91a0769f 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -50,6 +50,11 @@ install() {
if [ ! -x /lib/udev/vol_id ]; then
inst_rules 64-md-raid.rules
+ # remove incremental assembly from stock rules, so they don't shadow
+ # 65-md-inc*.rules and its fine-grained controls, or cause other problems
+ # when we explicitly don't want certain components to be incrementally
+ # assembled
+ 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"
fi
inst_rules "$moddir/65-md-incremental-imsm.rules"