Skip to content

Commit

Permalink
Disable lvm2 udev rules if dmsetup splitname fails
Browse files Browse the repository at this point in the history
If the output of `dmsetup splitname` cannot be trusted, the safest
option is to disable all lvm2 rules.
  • Loading branch information
DemiMarie committed Apr 3, 2022
1 parent 0cae942 commit bedc445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion udev/11-dm-lvm.rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="lvm_end"
ENV{DM_UUID}!="LVM-?*", GOTO="lvm_end"

# Use DM name and split it up into its VG/LV/layer constituents.
IMPORT{program}="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}"
IMPORT{program}!="(DM_EXEC)/dmsetup splitname --nameprefixes --noheadings --rows $env{DM_NAME}", GOTO="lvm_disable"

# DM_SUBSYSTEM_UDEV_FLAG0 is the 'NOSCAN' flag for LVM subsystem.
# This flag is used to temporarily disable selected rules to prevent any
Expand Down

0 comments on commit bedc445

Please sign in to comment.