[Drbd-dev] [PATCH 1/1] fix drbd.rules to avoid start drbd fail
Roland Kammerer
roland.kammerer at linbit.com
Wed Jul 2 15:08:32 CEST 2014
On Fri, Jun 27, 2014 at 05:16:08PM +0800, Liuhua Wang wrote:
> fix drbd.rules by removing NAME and adding a SYMLINK to kernel node for
> the reason that when drbd configuration has a device name different from
> kernel node, device name will not be created since renaming a kernel node
> fails. So start drbd by pacemaker will fail.
>
> Signed-off-by: Liuhua Wang <lwang at suse.com>
> ---
> scripts/drbd.rules | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/drbd.rules b/scripts/drbd.rules
> index dbdfdba..3c967f0 100644
> --- a/scripts/drbd.rules
> +++ b/scripts/drbd.rules
> @@ -12,4 +12,6 @@
> # having it as one single line avoids those problems.
> #
> # DO NOT WRAP THIS LINE
> -SUBSYSTEM=="block", KERNEL=="drbd*", IMPORT{program}="/usr/sbin/drbdadm sh-udev minor-%m", NAME="$env{DEVICE}", SYMLINK="$env{SYMLINK}"
> +SUBSYSTEM=="block", KERNEL=="drbd*", IMPORT{program}="/usr/sbin/drbdadm sh-udev minor-%m", SYMLINK="$env{SYMLINK}"
> +TEST!="$env{DEVICE}", SYMLINK+="$env{DEVICE}"
> +
> --
> 1.9.0
Hi Liuhua,
could you please test the attached drbd.rules and report if they also
fix your problem?
Kind regards, rck
-------------- next part --------------
# This file contains the rules to create named DRBD devices.
SUBSYSTEM!="block", GOTO="drbd_end"
KERNEL!="drbd*", GOTO="drbd_end"
IMPORT{program}="/usr/sbin/drbdadm sh-udev minor-%m"
NAME=="", ENV{DEVICE}!="", NAME="$env{DEVICE}"
# Use symlink from the environment if available
ENV{SYMLINK}!="", SYMLINK="$env{SYMLINK}", GOTO="drbd_end"
# Legacy rules for DRBD 8.3 & 8.4
ENV{DISK}!="", SYMLINK+="drbd/by-disk/$env{DISK}"
ENV{RESOURCE}!="", SYMLINK+="drbd/by-res/$env{RESOURCE}"
LABEL="drbd_end"
More information about the drbd-dev
mailing list