Modify udev rules file so non-block devices aren't renamed
PATCH 1/1 Modify udev rules file so non-block devices aren't renamed
Phil/Lars/Andreas,
attached is a suggested patch for the udev rules file that DRBD ships. Julian Seifert ("alamar" on freenode) made the interesting choice of naming one of his network interfaces "drbdlink". This the drbd udev rule apparently then promptly re-renamed "drbd0", which shouldn't happen.
As always, feel free to improve the patch as you see fit. If you wish to apply it unmodified, consider pulling it from the "drbd-8.3" branch in my GitHub repo; git://github.com/fghaas/drbd-8.git.
Cheers,
Florian
PATCH 1/1 udev rules file: skip if invoked for a subsystem other than block
--- scripts/drbd.rules | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
scripts/drbd.rules +4 -0
@@ -1,5 +1,7 @@ # This file contains the rules to create named DRBD devices. +SUBSYSTEM!="block", GOTO="drbd_end" + # DO NOT WRAP THIS LINE # # old udev does not understand some of it,
@@ -13,3 +15,5 @@ # # DO NOT WRAP THIS LINE KERNEL=="drbd*", IMPORT{program}="/sbin/drbdadm sh-udev minor-%m", NAME="$env{DEVICE}", SYMLINK="drbd/by-res/$env{RESOURCE} drbd/by-disk/$env{DISK}" + +LABEL="drbd_end"
Signature · 1 line
1.7.5.4
PATCH 1/1 udev rules file: skip if invoked for a subsystem other than block
In reply to Florian Haas--- scripts/drbd.rules | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
scripts/drbd.rules +4 -0
@@ -1,5 +1,7 @@ # This file contains the rules to create named DRBD devices. +SUBSYSTEM!="block", GOTO="drbd_end" + # DO NOT WRAP THIS LINE # # old udev does not understand some of it,
@@ -13,3 +15,5 @@ # # DO NOT WRAP THIS LINE KERNEL=="drbd*", IMPORT{program}="/sbin/drbdadm sh-udev minor-%m", NAME="$env{DEVICE}", SYMLINK="drbd/by-res/$env{RESOURCE} drbd/by-disk/$env{DISK}" + +LABEL="drbd_end"
Signature · 1 line
1.7.5.4