[DRBD-user] VERY easy to use script for kvm/drbd/ha

joukoy joukoy at gmail.com
Sun Jun 5 10:39:14 CEST 2011

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


4.6.2011 19:53, Rasto Levrinc kirjoitti:
> On Thu, June 2, 2011 9:43 am, joukoy wrote:
>> I posted this to linux-ha, but maybe this is better place?
>>
>>
>> I am trying to find easy-to-use distribution and/or tool for managing
>> cluster with: - 2 hosts
>> - drbd replication between hosts
>> - HA for virtual machines&  drbd
>> But can't find anything that really fits my requirements, so I created a
>> script...
>>
>> Now I have Scientific Linux 6 x86_64 installed in 2 identical machines
>> with this configuration: - Gigabit ethernet between hosts
>> - KVM virtualization
>> - Pacemaker/Corosync, configured with DRBD-MC
>> - LVM volume group, named "vg01" with free space for VM's
>> - public key authentication, so I can run commands in both hosts
>>
>>
>> When I run my script with "create" parameter, it will do the following:
>> - Ask name for new virtual machine (GUI with zenity :) )
>> - Ask disk size for VM
>> - Create logical volume in both hosts
>> - setup DRBD replication for volumes
>> - Create new VM and configure it to use /dev/drbd? as harddisk
>> - Open Virtual Machine Manager so user can modify settings for VM
>> - Configure cluster to take care of drbd&  VM
> You should be able to all that with DRBD:MC. Well, the LVM part is
> available if you are LINBIT customer.
>
> Rasto
>
True. It is great software, you can do many things with it, including 
everything my script does and lot more.
This is just special case for 2 host cluster for KVM virtual machines.
But if I compare required steps, my script vs DRBD-MC in this case, 
there is big difference.

My script:
1. Give name for VM
2. Select size for harddisk
3. Configure VM (optional)
So, you can create virtual machine without any knowledge about cluster 
or drbd.

DRBD-MC:
1. Create LVM disk in host1
2. Create LVM disk in host2
3. Setup DRBD replication, select name for your resource
4. Create and configure VM, remember to select /dev/drbdX as disk
5. Add service linbit:drbd, select name for it
6. Select previously created drbd service
7. Add service Virtualdomain, select name for it
8. Select previously created VM (virtual domain configuration)
9. Click service linbit:drbd and select Start before -> Virtual Domain 
(your VM)

After these steps, DRBD-MC is good tool for monitoring & fine-tuning in 
both cases.

My script is now available in:
https://github.com/joukoy/KVM-cluster-tool




More information about the drbd-user mailing list