[DRBD-user] What does "drbdadm sh-b-pri all" (as in drbd.service) do?

Lars Ellenberg lars.ellenberg at linbit.com
Tue Oct 28 22:18:48 CET 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

On Tue, Oct 28, 2014 at 06:58:47PM +0100, Lutz Vieweg wrote:
> While trying to investigate the issue of my recent mail to this list
> I found a command in the drbd.service configuration file for systemd
> that I don't find explained anywhere in the DRBD documentation:
> ># Switch resources to primary if applicable
> ># Better: disable this service unit, and use a cluster manger (pacemaker)
> >ExecStart=/sbin/drbdadm sh-b-pri all
> The two comment lines give only a small hint - what does
> "applicable" in "Switch resources to primary if applicable" mean -
> would this command switch the resource to "primary" only if
> such was asked for in /etc/drbd.conf? Or regardless of the
> primary/secondary settings for hosts there?
> The man page of "drbdadm" does not mention a subcommand "sh-b-pri".

sh-b-pri will (try to) promote all resources
that mention this "become-primary" thingy in drbd.conf.
But you should not use that.

You are supposed to use a cluster manager (preferably pacemaker).
If you do so, you are supposed to NOT use drbd init scripts or unit
files at all.  (please disable)

*also*, even if you do use drbd init scripts/unit files,
you are supposed to not use "become primary" in drbd.conf,
which is meant to only be used as a stop-gap band-aid
for deployments that do not have a cluster manager.

using "become-primary" is in most cases a sign
of good potential for improvement in the overall setup.


More information about the drbd-user mailing list