1 # These rules can delete partitions devnodes for slave devices
2 # for certain aggregate devices such as multipath.
3 # This is desirable to avoid confusion and keep the number
4 # of device nodes and symlinks within limits.
6 # This is done only once on the first "add" or "change" event for
9 # To suppress this, use the kernel parameter "dont_del_part_nodes",
10 # or create an udev rule file that sets ENV{DONT_DEL_PART_NODES}="1".
12 SUBSYSTEM!="block", GOTO="end_del_part_nodes"
13 KERNEL!="sd*|dasd*", GOTO="end_del_part_nodes"
14 ACTION!="add|change", GOTO="end_del_part_nodes"
15 ENV{DEVTYPE}=="partition", GOTO="end_del_part_nodes"
17 IMPORT{cmdline}="dont_del_part_nodes"
18 ENV{dont_del_part_nodes}=="1", GOTO="end_del_part_nodes"
19 ENV{DONT_DEL_PART_NODES}=="1", GOTO="end_del_part_nodes"
22 ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="del_part_nodes"
24 # Other aggregate device types can be added here.
26 GOTO="end_del_part_nodes"
28 LABEL="del_part_nodes"
29 IMPORT{db}="DM_DEL_PART_NODES"
30 ENV{DM_DEL_PART_NODES}!="1", ENV{DM_DEL_PART_NODES}="1", \
31 RUN+="/usr/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
33 LABEL="end_del_part_nodes"