High Availability through Virtualization Is RAID enough? Tomas Florian
Florien Consulting Linux servers Windows workstation interoperability VPNs / Remote access .NET development
Summary High Availability Virtualization HA + Virtualization Questions DRBD Failover Heartbeat Virtualization Xen vs VMWare Xen architecture HA + Virtualization Questions
High Availability : HA Linux-ha.org project Graceful degradation Better than:
Challenges Replicate data Failover Automatically detect failure node1 node2 Replicate data DRBD Network RAID-1 Failover Take over responsibilities from the dead peers Automatically detect failure Heartbeat
Replicate Data: DRBD Distributed Replicated Block Device Network RAID-1 One active drive (primary) N spare drives replicated on the network in real-time In case of primary HD failure, switch to one of the available secondary drives Mount just like any other block device mount /dev/drbd0 /data
Failover : haresources node1 running Apache node2 running qmail node1 dies … apache dies. Node 2: Take over primary use of DRBD device Take over IP Take over Apache
Detect Failure: heartbeat Ping through ethernet Split brain Ping through serial cable + ethernet STONITH – Shoot The Other Node In The Head .. node2 is dead .. Time to takeover .. node1 is dead .. Time to takeover node1 node2
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example Apache qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources Dead resources
Example drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Apache Named mysql qmail drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources
Summary High Availability Virtualization HA + Virtualization Questions DRBD Failover Heartbeat Virtualization Xen vs VMWare Xen architecture HA + Virtualization Questions
Xen Pronounced ‘Zen’ Open Source Run multiple virtual machines on one physical machine Like VMWare but different (better)
Xen Architecture
Setting up Xen Install xen software on any Linux Patch Domain-0 kernel Boot to the new Domain-0 kernel Deploy Domain-U virtual machines Allocate disk Deploy any distribution with a patched Domain-U kernel …Or use a distribution that does this for you
Full Virtualization vs Paravirtualization Needs kernel patch Open source guest OS only (MS will not let you patch Windows kernel) Full virtualization Hypervisor implemented with VT CPUs Windows on Xen possible
VT hardware Intel AMD Check that your BIOS also supports VT Vanderpool technology Intel Pentium D Intel Core Duo AMD Pacifica Check that your BIOS also supports VT
VT support in Xen 2.0.7 stable as a rock (but no VT) 3.0.2 unstable (VT… almost) People regularly report success running Windows guests … … and crashes Once v3 becomes stable it will be unstoppable
Summary High Availability Virtualization HA + Virtualization Questions DRBD Failover Heartbeat Virtualization Xen vs VMWare Xen architecture HA + Virtualization Questions
No virtualization… MySQL samba named Apache qmail drbd0 drbd1 drbd0 node1 node2 Active resources Backup resources
…with virtualization Web server Mail server drbd0 drbd1 drbd0 drbd1 Apache qmail MySQL named named drbd0 drbd1 drbd0 drbd1 node1 node2 Active resources Backup resources
Gains Whole filesystem protection Simplified management Security: / … not just /data Simplified management Manage failover for few machines rather than tens of services No complicated syncing of updates or configuration on the nodes Security: If one service is hacked, only one VM is compromised
Pit falls Performance Watch out for: Don’t forget to backup Running VMs more resource intensive than running daemons Watch out for: Virtual Memory thrashing DRBD sync speed HD performance … going overboard Don’t forget to backup
Resources Linux High Availability Project Xen web site Linux-ha.org Xen web site Google search for “xen” Xen Distributions SuSE FC5 Xen Live CD … or just compile on any 2.4.x - 2.6.x kernel Paid support www.florien.ca
Summary High Availability Virtualization HA + Virtualization Questions DRBD Failover Heartbeat Virtualization Xen vs VMWare Xen architecture HA + Virtualization Questions
Questions