[Pacemaker] How to properly define DRBD resources

Nikita Staroverov nsforth at gmail.com
Tue Dec 17 04:08:04 EST 2013


17.12.2013 12:49, Michał Margula пишет:
> Hello!

Hello!
>
> Let me go trough it to see if I understand correctly:
>
> W dniu 17.12.2013 08:57, Nikita Staroverov pisze:
>> primitive drbd_YOURVM ocf:linbit:drbd \
>> params drbd_resource="YOURVM" \
>> op monitor interval="29s" role="Master" \
>> op monitor interval="31s" role="Slave"
>>
>>
>
> So here difference is target-role dropped? I had "Started" here.
Yes, there is difference. drdb primitive completely managed by 
multistate resource. Target-Role in drbd primitive causes troubles.
I think this is the reason of your problem with resources actions looping.
>
>
>> primitive kvm_YOURVM ocf:heartbeat:VirtualDomain \
>> params config="/etc/libvirt/qemu/YOURVM.xml"
>> migration_transport="ssh" \
>> meta allow-migrate="false" target-role="Started"
>> is-managed="true" \
>> op start interval="0" timeout="120s" \
>> op stop interval="0" timeout="120s" \
>> op monitor interval="60s" timeout="120s"
>
> Here seems to be the same (I use xen but it shouldn't matter).
Yes. It doesn't matter.
>
>>
>> ms ms_drbd_YOURVM drbd_YOURVM \
>> meta master-max="1" master-node-max="1" clone-max="2"
>> clone-node-max="1" notify="true" target-role="Started" is-managed="true"
>>
>
> So here target-role is "Started" instead of "Master". And I have 
> master-max set to 2 and you have set to 1. It causes to have Master 
> (Primary DRBD) on one node and Slave (Secondary DRBD) on another?
Yes. If you want primary/primary, set master-max to 2. order promote 
action changes ms drbd from secondary/secondary to primary/secondary(if 
master-max=1) or to primary/primary(if master-max=2).
>
>> location kvm_YOURVM_prefer_YOURFIRSTSERVER kvm_YOURVM 50: 
>> YOURFIRSTSERVER
>
> It is optional? I mean it should not have any impact on DRBD 
> configuration.
Yes. I use it for preferred location of VM's.
>
>> order kvm_YOURVM_after_drbd_YOURVM inf: ms_drbd_YOURVM:promote
>> kvm_YOURVM:start
>
> Same here.
No. Pacemaker with my configuration starts ms drbd in slave/slave 
configuration. Due to ordering rule pacemaker promotes drbd before VM 
starts.
>
>> In my configuration VM's works with primary/secondary drbd.
>
> Why not dual primary? Is there a reason for that?
>
> Thank you for your help!
>
I use KVM virtual machines with cache=writethrough, so i can't use live 
migration.




More information about the Pacemaker mailing list