[DRBD-user] Mount problem at boot on multimaster config

Ervin Hegedüs airween at gmail.com
Tue Sep 3 12:14:42 CEST 2019


Dear Robert,

many thanks for your answer,

On Tue, Sep 03, 2019 at 10:17:20AM +0200, Robert Altnoeder wrote:
> On 9/1/19 7:09 PM, Ervin Hegedüs wrote:
> > Hi there,
> >
> > I have an up-to-date Debian 10 system, with drbd 8.4.10, and ocfs2
> > 1.8.5.
> >
> > [...]
> >
> > Looks like the /dev/drbd0 doesn't exists at boot time, but when I
> > log in, it builded.
> 
> Looks like a typical race condition - trying to mount before the DRBD
> device has connected to the peer node and switched to the primary role.
> The mount process must wait for the DRBD device to become usable before
> trying to mount.

I thought that - tried to modify the systemd files (added the
dev-drbd0.device to ocfs2.service, and so on...), but didn't get
any result.

> > Am I missing something? Or there is some network issue, eg. slow
> > network...?
> >
> > This config (which is _same_) works on Debian 9 without any
> > issue.
> 
> In that case, and provided that Debian 9 doesn't have any dependencies
> configured that Debian 10 doesn't, it probably works on Debian 9 by pure
> coincidence - e.g., different timing due to the order of service
> startup. That also means it could stop working any moment if the timing
> changes, so it would certainly be a good idea to check the dependencies
> on those Debian 9 systems too.

thanks - meantime I put the "sleep 10 && mount -a" command to the
/etc/rc.local, and configured the rc.local as service - it solves
that problem.

Anyway, the size of volume is 10G, is it possible that the
connection time isn't enough before the mount starts?

Just a small additional info: I realized when I rebooted the
system (they runs on VMWare), there is a message on console,
something like this:

block drbd0: State change failed: Device is held open by someone
block drbd0:   state = { cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate r-----
block drbd0:  wanted = { cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate r-----

May be this triggered the issue?


And after the boot:

# systemctl status drbd.mount
● drbd.mount - /drbd
   Loaded: loaded (/etc/fstab; generated)
   Active: failed (Result: exit-code) since Tue 2019-09-03 12:06:14 CEST; 4min 57s ago
    Where: /drbd
     What: /dev/drbd0
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)

szept 03 12:06:14 t2app1 systemd[1]: Mounting /drbd...
szept 03 12:06:14 t2app1 mount[700]: mount.ocfs2: I/O error on channel while opening device /dev/drbd0
szept 03 12:06:14 t2app1 systemd[1]: drbd.mount: Mount process exited, code=exited, status=1/FAILURE
szept 03 12:06:14 t2app1 systemd[1]: drbd.mount: Failed with result 'exit-code'.
szept 03 12:06:14 t2app1 systemd[1]: Failed to mount /drbd.



So, do you think it would be good to report this at Debian as
bug?


Thanks,


a.
 


More information about the drbd-user mailing list