kpartx: don't delete partitions from partitions
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 7 Dec 2017 18:48:56 +0000 (12:48 -0600)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 13 Jan 2018 09:12:19 +0000 (10:12 +0100)
The current del-part-nodes rules try to run partx on the partitions
themselves, which will ofen fail with an error in the log, because the
partitions will have been deleted before partx can run on them.

Cc: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/del-part-nodes.rules

index cee945d..17bc505 100644 (file)
@@ -12,6 +12,7 @@
 SUBSYSTEM!="block", GOTO="end_del_part_nodes"
 KERNEL!="sd*|dasd*|rbd*", GOTO="end_del_part_nodes"
 ACTION!="add|change", GOTO="end_del_part_nodes"
+ENV{DEVTYPE}=="partition", GOTO="end_del_part_nodes"
 
 IMPORT{cmdline}="dont_del_part_nodes"
 ENV{dont_del_part_nodes}=="1", GOTO="end_del_part_nodes"