<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>High-availability KVM over DRBD active/passive with Pacemaker and Corosync:</div><div><br></div><div>- Two hardware nodes with two NICs. One NIC directly connected to the other node for DRBD mirroring, the second to the network, Operating system Debian Wheezy RC1 (no joy with Debian Squeeze)</div><div>- A spare partition on each machine is configured as a LVM volume group</div><div>- Inside the volume group we carve out logical volumes, one logical volume for each guest machine</div><div>- Logical volumes are mirrored with DRBD in an active/passive configuration. Each mirrored logical volume is used as a raw storage device for one KVM machine. Alternatively one could use a file system and store the VMs as files.</div><div>The setup allows flexibly move guest machines across the 2 nodes, depending on load. Also disk access is almost as fast as on physical hardware, no fancy cluster file system etc. needed. Overall it is near bare-metal performance.</div><div><br></div><div>We used the amazing LCMC tool for the hosts, drbd and pacemaker and Corosync setup</div><div><a href="http://lcmc.sourceforge.net/">http://lcmc.sourceforge.net/</a> </div><div><br></div><div>LCMC does lots of the setup automatic - a huge timesaver. Some fine-tuning had to be from the command line with CRM configure as the colocation and order parameters could not be configured from LCMC</div><div><br></div><div>Config file for hosting HA KVM machines</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">node ffmnode3 \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>attributes standby="off"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">node ffmnode4 \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>attributes standby="off"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">primitive res_VirtualDomain_1 ocf:heartbeat:VirtualDomain \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>params config="/etc/libvirt/qemu/ffmttavpx.xml" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>operations $id="res_VirtualDomain_1-operations" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op start interval="0" timeout="90" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op stop interval="0" timeout="90" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op monitor interval="10" timeout="30" start-delay="0" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op migrate_from interval="0" timeout="60" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op migrate_to interval="0" timeout="120" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>meta target-role="started" migration-threshold="1"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">primitive res_drbd_1 ocf:linbit:drbd \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>params drbd_resource="ffmttapx" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>operations $id="res_drbd_1-operations" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op start interval="0" timeout="240" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op promote interval="0" timeout="90" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op demote interval="0" timeout="90" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op stop interval="0" timeout="100" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op monitor interval="10" timeout="20" start-delay="0" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>op notify interval="0" timeout="90" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>meta target-role="started" resource-stickiness="0"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">ms ms_drbd_1 res_drbd_1 \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>meta clone-max="2" notify="true" target-role="started"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">colocation ms_drbd_1-with-ffmttavpx inf: res_VirtualDomain_1 ms_drbd_1:Master</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">order ms_drbd_1-before-ffmttavpx inf: ms_drbd_1:promote res_VirtualDomain_1:start</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">property $id="cib-bootstrap-options" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>expected-quorum-votes="2" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>stonith-enabled="false" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>dc-version="1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>no-quorum-policy="ignore" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>cluster-infrastructure="openais"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; ">rsc_defaults $id="rsc-options" \</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space:pre"> </span>resource-stickiness="100"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; min-height: 17px; "><br></div></div></div><div>I hope it is useful for someone.</div><div><br></div><div>Cheers</div><div><br></div><div>Gerry</div><div><br></div><div><br></div></body></html>