[DRBD-user] DRBD Delay

Robert Altnoeder robert.altnoeder at linbit.com
Tue Jul 23 10:06:51 CEST 2019


On 7/22/19 6:34 PM, Banks, David (db2d) wrote:
> Is there a way to delay the loading of DRBD resources until after the underlying block system has made the devices available?
>
> I’ve looked in systemd but didn’t see any drbd services and wanted to ask before monkeying with that.

There must be some service or script somewhere that starts it, because
DRBD itself does not automatically start resources when the kernel
module is loaded.

> After reboot DRBD starts before the zfs volumes that is use are available so I have to do a 'drbdadm adjust all’ each time. I’d like it to just wait until the zfs-mount.service is done.

Another question is whether that will actually be good enough to
reliably start the DRBD resources. It may work sometimes, maybe even
often, and then sometimes it may fail, because many of the base OS
components such as udev, which makes various storage devices available,
have countless race conditions. In other words, I suspect that the
zfs-mount.service may finish successfully before the ZFS devices are
actually usable or visible in the /dev filesystem.
You may need to either add a delay (which still only increases the
chance that it will work, but does not guarantee it) or add some custom
programming to wait for the devices to be created in the /dev filesystem
and to actually start working (e.g., try opening one and see whether
that works).

br,
Robert



More information about the drbd-user mailing list