Web lists-archives.com

Re: control the order of service initialization in the Debian 9


On Thu, Feb 21, 2019 at 03:10:44PM -0300, Marcio Demetrio Bacci wrote:
> Hi,
> I need to control the order of service initialization in my Debian 9 Server.
> The problem is the following:
> I beliave that my DRBD service don't start because the iscsi doesn't ready.

Last time I've checked DRBD service did not start automatically at all.
Moreover, someone tried to be clever, and put the need of user
interaction into /etc/init.d/drbd in the form of "drbdadm
I admire the intention, but the result hardly usable if you do not have
an access to the console.

So, forcing iSCSI dependency may not do you any good.

> This way, I intend to change priority of DRBD initialization  to initialize
> after iscsi service.

See these lines at /etc/init.d/drbd?

# Required-Start: $local_fs $network $syslog
# Required-Stop:  $local_fs $network $syslog

Change them:

# Required-Start: $local_fs $network $syslog open-iscsi
# Required-Stop:  $local_fs $network $syslog open-iscsi

And invoke "systemctl daemon-reload".