Results 1 to 5 of 5

Thread: DRBD M/S resource NOT migrating properly

  1. #1

    Exclamation DRBD M/S resource NOT migrating properly

    SLES 15 SP1 + HA

    2 node HA cluster setup for DRBD storage

    Used HAWK Wizard to create a DRBD M/S resource. When this resource is started, it starts on both nodes with sn04 being the master/primary and sn03 as slave/secondary.

    primitive drbd01 ocf:linbit:drbd \
    params drbd_resource=drbd01 drbdconf="/etc/drbd.conf" \
    op monitor interval=29s role=Master \
    op monitor interval=31s role=Slave
    ms ms-drbd01 drbd01 \
    meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true

    If migrated, sn03 becomes master/primary and the resource does not run on sn04. In fact a location constraint ban is made for this resource on sn04.

    location cli-ban-ms-drbd01-on-sn04 ms-drbd01 role=Started -inf: sn04

    If the location constraint is deleted or the resource is un-migrated then the M/S resource goes back to master/primary on sn04 and slave/secondary on sn03

    SO, the question is;
    I would like to have the migrate just switch roles of the resource without any location constraint ban.
    Role switch of Master/Primary on sn04 and Slave/Secondary on sn03 -> migrate to -> Master/Primary on sn03 and Slave/Secondary on sn04.
    How can this be done?

  2. Re: DRBD M/S resource NOT migrating properly

    The cleanest method might be to set the primary node into "standby" --> # crm node standby --> or through HAWK
    This will stop all resources on this node and move everything over including promoting other node to drbd primary master.
    Once it's done, then bring node back online --> # crm node ready

  3. #3

    Re: DRBD M/S resource NOT migrating properly

    That may certainly work, but doesn't solve the issue.
    Migrate of a M/S resource should switch the roles from M/S to S/M and not auto create a location constraint ban.

    The DRBD M/S resources should be kept alive on both hosts to keep the replication going.
    Only on a standby or a server down should the DRDB M/S be in non-replication and then when brought back online be in replication

    How can I stop the auto creation of a location constraint ban?

  4. Re: DRBD M/S resource NOT migrating properly

    Quote Originally Posted by johngoutbeck View Post
    That may certainly work, but doesn't solve the issue.
    Migrate of a M/S resource should switch the roles from M/S to S/M and not auto create a location constraint ban.

    The DRBD M/S resources should be kept alive on both hosts to keep the replication going.
    Only on a standby or a server down should the DRDB M/S be in non-replication and then when brought back online be in replication

    How can I stop the auto creation of a location constraint ban?
    The constraint is how the cluster decides where to place the resource. The cli-ban constraint normally get's created when a "node name" location is not provided so it's essentially moving the resource away from a node with the "-inf" location constraint.
    If you use "crm resource migrate <ms resource> <node name>" it will create the cli-location constraint with a "inf" of the <node name> specified so it will prefer this node.

    If you don't want any constraints, then you need to use the cluster standby mode which is only in standby mode for the time it takes for resources to move over and then you can mark the node back online to start resources again which will start the replication again. This is normally done in less than a minute.

  5. #5

    Re: DRBD M/S resource NOT migrating properly

    Following your advice
    Created location constraint
    location l-drbd01 ms-drbd01 3000: sn03
    This ensures the M/S resource runs on the designated host
    --
    Master/Slave Set: ms-drbd01 [drbd01]
    Masters: [ sn03 ]
    Slaves: [ sn04 ]
    --

    then use the cli to migrate
    sn03:~ # crm resource migrate ms-drbd01 sn04
    INFO: Move constraint created for ms-drbd01 to sn04
    - switched the roles from M/S to S/M and auto created a prefer location constraint ( with infinity) overriding the manuel location contraint with a score of 3000
    --
    Master/Slave Set: ms-drbd01 [drbd01]
    Masters: [ sn04 ]
    Slaves: [ sn03 ]
    --

    now 2 location constraints
    location cli-prefer-ms-drbd01 ms-drbd01 role=Started inf: sn04
    location l-drbd01 ms-drbd01 3000: sn03

    HAWK unmigrate moves the resource back (and auto deletes the prefer location constraint)
    or deleting the location cli-prefer-ms-drbd01 moves the resource back on sn03 (either through HAWK ir cli)

    -- cli unmigrate
    crm resource unmigrate ms-drbd01
    INFO: Removed migration constraints for ms-drbd01
    -- cli delete prefer location constraint
    crm configure delete cli-prefer-ms-drbd01

    So this works in keeping the replication going on the 2 hosts.

    Thank you for your help.
    Hope this helps others.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •