[DRBD-user] ocf resource puts drbd in secondary mode on startup

Lars Ellenberg lars.ellenberg at linbit.com
Sun Oct 6 01:31:18 CEST 2013

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

On Fri, Oct 04, 2013 at 12:16:37PM +0400, "Вершинин В.И." wrote:
> Hi!
> I am try to use two nodes active active drbd (8.4.2) configuration
> with pacemaker(1.1.10,1.1.9 ). The drbd is main resource in my
> cluster, so there is the first resource in order,and  other
> resources is co-located on drbd.
> The two cluster nodes starts without any problem, and resource is
> correctly migrates to a on-line node, when I put another one to
> standby mode.
> But if I put  standby node  on-line the drbd ocf resource try to
> demote drbd, so it stop co-located resources ( such as virtual
> domain ) before. I think, this is not what I want from cluster.
> I look in ocf source file and find this code in drbd_start() function
> drbd_start() {
> ....
>         ocf_log warn "$DRBD_RESOURCE already Primary, demoting."
>         do_drbdadm secondary $DRBD_RESOURCE
> ....
> }
> So I have some questions for developers:
> 1. Is it nessesary to put drbd in secondary mode if it run as master?

If, according to the cluster manager, this resource is supposed to be
"Slave" (same as "Started" in Pacemaker speak),
then the resource agent must make it so.

> 2. Can this part of code stop my resources when i return standby
> node? online?

Not supposed to happen.

> 3. What can happend if I  remove demoting code?

You break things.

> I think it must be like this
> drbd_start() {
> ....
>            ocf_log warn "$DRBD_RESOURCE already Primary."
>      	 rc=$OCF_SUCCESS
>          break
>          ;;
>          ...
>  }
> I shall try this, may be next night (to prevent rebooting my virtual
> servers in work time).


Your problem is not with the DRBD resource agent,
but with your pacemaker configuration.


: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
please don't Cc me, but send to list   --   I'm subscribed

More information about the drbd-user mailing list