Re: [DRBD-user] DRBD Delay

2019-07-30 Thread Banks, David (db2d)
This did not work.


On Jul 24, 2019, at 9:03 AM, Banks, David (db2d) 
mailto:d...@virginia.edu>> wrote:

Tried adding new drbd.service file below. In the middle of a data transfer now 
but will try a reboot when done.

[Unit]
Description=DRBD -- please disable. Unless you are NOT using a cluster manager.
Wants=network.target sshd.service network-online.target zfs-import.target
After=network.target sshd.service network-online.target zfs-import.target

[Service]
Type=oneshot


---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 24, 2019, at 2:28 AM, Gianni Milo 
mailto:gianni.mil...@gmail.com>> wrote:

It might worth having a look at the drbd.service systemd unit file...

dpkg -l | grep drbd
ii  drbd-dkms9.0.19-1   all 
 RAID 1 over TCP/IP for Linux module source
ii  drbd-utils   9.10.0-1   amd64   
 RAID 1 over TCP/IP for Linux (user utilities)

dpkg -L drbd-utils|grep drbd.service
/lib/systemd/system/drbd.service

Gianni

On Tue, 23 Jul 2019 at 17:07, Banks, David (db2d) 
mailto:d...@virginia.edu>> wrote:
Thanks Veit, that’s what I use to start it manually. I’m looking for the 
automated approach so that it starts on it’s own reliably after system start.

---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 23, 2019, at 3:49 AM, Veit Wahlich 
mailto:cru.li...@zodia.de>> wrote:

Hi David,

have a look at the documentation of drbdadm; the commands up, down and
adjust might be what you are looking for.

Best regards,
// Veit


Am Montag, den 22.07.2019, 16:34 + schrieb Banks, David (db2d):
Hello,

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.

System: Ubuntu 18.04
DRBD: 8.9.10

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.

Thanks!

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-24 Thread Banks, David (db2d)
Tried adding new drbd.service file below. In the middle of a data transfer now 
but will try a reboot when done.

[Unit]
Description=DRBD -- please disable. Unless you are NOT using a cluster manager.
Wants=network.target sshd.service network-online.target zfs-import.target
After=network.target sshd.service network-online.target zfs-import.target

[Service]
Type=oneshot


---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 24, 2019, at 2:28 AM, Gianni Milo 
mailto:gianni.mil...@gmail.com>> wrote:

It might worth having a look at the drbd.service systemd unit file...

dpkg -l | grep drbd
ii  drbd-dkms9.0.19-1   all 
 RAID 1 over TCP/IP for Linux module source
ii  drbd-utils   9.10.0-1   amd64   
 RAID 1 over TCP/IP for Linux (user utilities)

dpkg -L drbd-utils|grep drbd.service
/lib/systemd/system/drbd.service

Gianni

On Tue, 23 Jul 2019 at 17:07, Banks, David (db2d) 
mailto:d...@virginia.edu>> wrote:
Thanks Veit, that’s what I use to start it manually. I’m looking for the 
automated approach so that it starts on it’s own reliably after system start.

---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 23, 2019, at 3:49 AM, Veit Wahlich 
mailto:cru.li...@zodia.de>> wrote:

Hi David,

have a look at the documentation of drbdadm; the commands up, down and
adjust might be what you are looking for.

Best regards,
// Veit


Am Montag, den 22.07.2019, 16:34 + schrieb Banks, David (db2d):
Hello,

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.

System: Ubuntu 18.04
DRBD: 8.9.10

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.

Thanks!

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-24 Thread Gianni Milo
It might worth having a look at the drbd.service systemd unit file...

dpkg -l | grep drbd
> ii  drbd-dkms9.0.19-1
> all  RAID 1 over TCP/IP for Linux module source
> ii  drbd-utils   9.10.0-1
> amd64RAID 1 over TCP/IP for Linux (user utilities)


dpkg -L drbd-utils|grep drbd.service
> /lib/systemd/system/drbd.service
>

Gianni

On Tue, 23 Jul 2019 at 17:07, Banks, David (db2d)  wrote:

> Thanks Veit, that’s what I use to start it manually. I’m looking for the
> automated approach so that it starts on it’s own reliably after system
> start.
>
> * ---*
>
> *Dav Banks *School of Architecture
> University of Virginia
> Campbell Hall, Rm 138
> (o) 434.243.8883
> (e) dav.ba...@virginia.edu
>
> On Jul 23, 2019, at 3:49 AM, Veit Wahlich  wrote:
>
> Hi David,
>
> have a look at the documentation of drbdadm; the commands up, down and
> adjust might be what you are looking for.
>
> Best regards,
> // Veit
>
>
> Am Montag, den 22.07.2019, 16:34 + schrieb Banks, David (db2d):
>
> Hello,
>
> 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.
>
> System: Ubuntu 18.04
> DRBD: 8.9.10
>
> 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.
>
> Thanks!
>
> ___
> Star us on GITHUB: https://github.com/LINBIT
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
>
>
> ___
> Star us on GITHUB: https://github.com/LINBIT
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-23 Thread Banks, David (db2d)
Thanks Veit, that’s what I use to start it manually. I’m looking for the 
automated approach so that it starts on it’s own reliably after system start.

---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 23, 2019, at 3:49 AM, Veit Wahlich 
mailto:cru.li...@zodia.de>> wrote:

Hi David,

have a look at the documentation of drbdadm; the commands up, down and
adjust might be what you are looking for.

Best regards,
// Veit


Am Montag, den 22.07.2019, 16:34 + schrieb Banks, David (db2d):
Hello,

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.

System: Ubuntu 18.04
DRBD: 8.9.10

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.

Thanks!

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-23 Thread Banks, David (db2d)
Thanks Robert! Any thoughts on where that service or script resides? I would 
have thought it would be in the systemd folder but no joy.

---
Dav Banks
School of Architecture
University of Virginia
Campbell Hall, Rm 138
(o) 434.243.8883
(e) dav.ba...@virginia.edu

On Jul 23, 2019, at 4:06 AM, Robert Altnoeder 
mailto:robert.altnoe...@linbit.com>> wrote:

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

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-23 Thread Robert Altnoeder
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

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] DRBD Delay

2019-07-23 Thread Veit Wahlich
Hi David,

have a look at the documentation of drbdadm; the commands up, down and
adjust might be what you are looking for.

Best regards,
// Veit


Am Montag, den 22.07.2019, 16:34 + schrieb Banks, David (db2d):
> Hello,
> 
> 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.
> 
> System: Ubuntu 18.04
> DRBD: 8.9.10
> 
> 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.
> 
> Thanks!
> 
> ___
> Star us on GITHUB: https://github.com/LINBIT
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


[DRBD-user] DRBD Delay

2019-07-22 Thread Banks, David (db2d)
Hello,

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.

System: Ubuntu 18.04
DRBD: 8.9.10

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.

Thanks!

___
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user