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

joukoy joukoy at gmail.com
Thu Jun 2 09:43:23 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.


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

And with "delete" parameter it will remove cluster , VM, drbd and lvm 
configs for selected VM.

I hope someone with programming skills can try and improve this ( a lot 
:-) )

Standard disclaimer: I am not responsible if this script destroys your 
data and/or server. Use at your own risk


-------------- next part --------------
A non-text attachment was scrubbed...
Name: kvm-helper.zip
Type: application/octet-stream
Size: 3346 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20110602/04bb8ed9/attachment.obj>


More information about the drbd-user mailing list