#2477 Issue closed: DRBD restore "failed to exec drbdadm-84: No such file or directory" on Ubuntu 18.04

Labels: waiting for info, support / question, no-issue-activity

b2blaycock opened issue at 2020-08-11 18:13:

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-an-Recover 2.6-git.4108.0f2f4a02.master / 2020-08-07

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

# so ensure nothing can go wrong if you run commands in configuration files.


OUTPUT=ISO
BACKUP=CDM
##EXCLUDE_RECREATE=( "$EXCLUDE_RECREATE[@]}" '/dev/drbd0' 'drbd' )
PROGS=( "${PROGS[@]}" drbdadm drbd8-utils )
  • Description of the issue (ideally so that others can reproduce it):

I have an Ubuntu 18.04 server that has drbd device /dev/drbd0.
When performing a ReaR recovery it fails to execute drbdadm stating

execvp() failed to exec drbdadm-84: No such file or directory

I have attempted to include drdbadm in the /etc/rear/local.conf and
still have the issue where drbdadm will not execute.

# so ensure nothing can go wrong if you run commands in configuration files.
OUTPUT=ISO
BACKUP=CDM
#EXCLUDE_RECREATE=( "$EXCLUDE_RECREATE[@]}" '/dev/drbd0' 'drbd' )
PROGS=( "${PROGS[@]}" drbdadm drbd8-utils )

LogPrint "Creating DRBD resource r0"
if ! drbdadm role r0 &>/dev/null ; then
   drbdadm -- --force create-md r0
fi

        if ! drbdadm role r0 &>/dev/null ; then
           drbdadm up r0
           drbdadm -- --overwrite-data-of-peer primary r0
        fi
component_created "/dev/drbd0" "drbd"
else
    LogPrint "Skipping /dev/drbd0 (drbd) as it has already been created."
fi
  • Workaround, if any:

To workaround the issue I exclude the /dev/drdb0 and drdb
from the recreate by modifying the /etc/rear/local.conf

# so ensure nothing can go wrong if you run commands in configuration files.
OUTPUT=ISO
BACKUP=CDM
EXCLUDE_RECREATE=( "$EXCLUDE_RECREATE[@]}" '/dev/drbd0' 'drbd' )
#PROGS=( "${PROGS[@]}" drbdadm drbd8-utils )

jsmeix commented at 2020-08-12 07:54:

I never used DRBD nor do I use Ubuntu so I cannot reproduce things myself.

From what I see in the ReaR scripts

# find usr/sbin/rear usr/share/rear/ -type f | xargs grep -i 'DRBD' | grep PROGS

usr/share/rear/layout/save/GNU/Linux/250_drbd_layout.sh:
grep -q '^drbd ' $DISKLAYOUT_FILE && REQUIRED_PROGS+=( drbdadm ) || true

usr/share/rear/prep/GNU/Linux/290_include_drbd.sh:
    REQUIRED_PROGS+=( drbdadm drbdsetup drbdmeta )

it seems all what gets included for DRBD by default in the ReaR recovery system
are the programs drbdadm drbdsetup drbdmeta
but none of the DRBD versioned binaries like drbdadm-84.
(I found https://bugs.gentoo.org/698304 that tells about DRBD versioned binaries.)

So I think what is missing is to also get the DRBD versioned binaries
like drbdadm-83 and drbdadm-84 included in the ReaR recovery system
so that DRBD setup during "rear recover" could succeed.

@b2blaycock
I don't know what drbd8-utils is.
I guess this is not a program but a software package name
but PROGS does not work for software packages,
see its description in default.conf
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L1226

# Program files (as found in PATH) to include in the rescue/recovery system:
# These progs are optional, if they are missing, nothing happens
PROGS=( )
#
# Required programs in the rescue/recovery system:
# Same as above, but if they are missing, we abort.
REQUIRED_PROGS=(

and
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L1375

# To get non-mandatory programs into the recovery system, use the PROGS array.
# To get mandatory programs into the recovery system, use the REQUIRED_PROGS array.

so something like the following in /etc/rear/local.conf may help

REQUIRED_PROGS+=( drbdadm-84 drbdsetup-84 )

I don't know if there is also a drbdmeta-84 program.

gdha commented at 2020-08-28 14:17:

@b2blaycock Are you able to verify the advise @jsmeix proposed? If it seems successful why not preparing a PR for the same? Thanks.

github-actions commented at 2020-10-28 02:01:

Stale issue message


[Export of Github issue for rear/rear.]