[PATCH 03/33] Add support for "multipath=off" and "nompath" on kernel cmdline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Wilck <mwilck@xxxxxxx>

Add support for disabling multipathd startup from the kernel command line.
This is useful for debugging purposes.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 multipath/multipath.rules     | 5 +++++
 multipathd/multipathd.service | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/multipath/multipath.rules b/multipath/multipath.rules
index c8fb7e68..86defc0c 100644
--- a/multipath/multipath.rules
+++ b/multipath/multipath.rules
@@ -3,6 +3,11 @@ SUBSYSTEM!="block", GOTO="end_mpath"
 ACTION!="add|change", GOTO="end_mpath"
 KERNEL!="sd*|dasd*", GOTO="end_mpath"
 
+IMPORT{cmdline}="nompath"
+ENV{nompath}=="?*", GOTO="end_mpath"
+IMPORT{cmdline}="multipath"
+ENV{multipath}=="off", GOTO="end_mpath"
+
 ENV{DEVTYPE}!="partition", GOTO="test_dev"
 IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH"
 ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{ID_FS_TYPE}="none", \
diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
index 126012b8..fd66cf62 100644
--- a/multipathd/multipathd.service
+++ b/multipathd/multipathd.service
@@ -6,6 +6,8 @@ Before=local-fs-pre.target blk-availability.service
 After=multipathd.socket systemd-udev-trigger.service systemd-udev-settle.service
 DefaultDependencies=no
 Conflicts=shutdown.target
+ConditionKernelCommandLine=!nompath
+ConditionKernelCommandLine=!multipath=off
 
 [Service]
 Type=notify
-- 
2.11.0

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux