multipath.rules: handle NVME devices
[multipath-tools/.git] / multipath / multipath.rules
1 # Set DM_MULTIPATH_DEVICE_PATH if the device should be handled by multipath
2 SUBSYSTEM!="block", GOTO="end_mpath"
3 ACTION!="add|change", GOTO="end_mpath"
4 KERNEL!="sd*|dasd*|nvme*", GOTO="end_mpath"
5
6 IMPORT{cmdline}="nompath"
7 ENV{nompath}=="?*", GOTO="end_mpath"
8 IMPORT{cmdline}="multipath"
9 ENV{multipath}=="off", GOTO="end_mpath"
10
11 ENV{DEVTYPE}!="partition", GOTO="test_dev"
12 IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH"
13 ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{ID_FS_TYPE}="none", \
14         ENV{SYSTEMD_READY}="0"
15 GOTO="end_mpath"
16
17 LABEL="test_dev"
18
19 ENV{MPATH_SBIN_PATH}="/sbin"
20 TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
21
22 ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
23         PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -u %k", \
24         ENV{DM_MULTIPATH_DEVICE_PATH}="1", ENV{ID_FS_TYPE}="mpath_member", \
25         ENV{SYSTEMD_READY}="0"
26
27 LABEL="end_mpath"