[Drbd-dev] [PATCH] udev rules file: skip if invoked for a subsystem other than block

Lars Ellenberg lars.ellenberg at linbit.com
Fri Mar 23 11:04:32 CET 2012


On Thu, Mar 22, 2012 at 01:44:36PM +0100, Florian Haas wrote:
> ---
>  scripts/drbd.rules |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/scripts/drbd.rules b/scripts/drbd.rules
> index 080635f..18708b7 100644
> --- a/scripts/drbd.rules
> +++ b/scripts/drbd.rules
> @@ -1,5 +1,7 @@
>  # This file contains the rules to create named DRBD devices.
>  
> +SUBSYSTEM!="block", GOTO="drbd_end"

I see what it does, and it probably is good practice,
or at least "polite" to do so.

Does this actually fix anything?

Do you have seen other devices with kernel provided device names
matching "drbd*" ?

"What's the point?"
Am I missing something?

> +
>  # 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"


More information about the drbd-dev mailing list