20
Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Embed Size (px)

Citation preview

Page 1: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Virtualisation on Linux and storage high-availability

(C) 2011 - CS / MI Adfinis SyGroup AG

Page 2: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Introduction

Adfinis SyGroup AG

Mario Iseli & Christian Schläppi

Page 3: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Table of contents

Virtualisation overview

Linux KVM

Requirements for dedicated storage

Storage concepts

Costs

Page 4: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Table of contents

HA concepts

Pimp your system

Filesystems

Our flagship implementation ;-)

Page 5: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Virtualisation overview

Full virtualisation (Hypervisor)

Para virtualisation (aka “pimped chroot”)

Page 6: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Linux KVM

Hypervisor, “out of the box”

libvirt

Frontend API

Backend API

nw-filter definition

Storage pool definition

Page 7: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Requirements for dedicated “Storage”

Problems with images

Complexity of migrations (large downtime)

Load-balancing

High-availability

Performance bottlenecks

Page 8: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Storage concepts

NFS (file-sharing, common HW)

iSCSI (block-device sharing, common HW)

FibreChannel (block-device sharing, custom HW)

Page 9: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Cost overview

“real” SANs (appliance solutions)

licensing

feature licensing

high CapEx and high Opex

“custom” Storage

Page 10: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

High-availability concepts

Master-Master Clusters

Master-Slave Clusters

Multinode Clusters

Load distribution in clusters

Page 11: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

General pimping

Memory sharing (KSM)

Network bonding (EtherChannel, Trunk, Aggregation - however you’d like to call it, IEEE802.3ad aka LACP)

VLANs (Trunking... again - IEEE802.1q)

Logical volumes (LVM)

Page 12: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Linux HA solutions

Pacemaker / Corosync

DRBD

Page 13: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Filesystems

Clustered filesystems

OCFS2

GFS

GlusterFS

Locking (DLM)

cLVM

Page 14: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Implementation

Architecture overview

Multipathing (and “protocol C” in DRBD)

KVM storage-management (attach a whole target from libvirt)

Config snippets

Page 15: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG
Page 16: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG
Page 17: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

node node1node node2primitive resFSvarwww ocf:heartbeat:Filesystem \ params device="/dev/drbd0" directory="/var/www" fstype="xfs" options="noatime" primitive resHTTPD lsb:lighttpd \ op monitor interval="10s" timeout="5s" \ meta target-role="Started"primitive resIntIP ocf:heartbeat:IPaddr2 \ params ip="10.10.10.30" cidr_netmask="24"primitive resNFS-Kernel-Server lsb:nfs-kernel-serverprimitive resPing ocf:pacemaker:ping \ params host_list="router1 router2" multiplier="100" \ op monitor interval="10s" timeout="20s" \ op start interval="0" timeout="90s" \ op stop interval="0" timeout="100s"

Page 18: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

group groupService resPubIP resIntIP resNFS-Common resNFS-Kernel-Server ms msDRBD resDRBD \ meta master-max="2" notify="true" target-role="Master" is-managed="true"clone clonePing resPing \ meta globally-unique="false"location locServiceonConnected groupService \ rule $id="locServiceonConnected-rule" -inf: not_defined pingd or pingd lte 0colocation colServiceDRBD inf: groupService msDRBD:Masterorder ordDRBDbeforeService 0: msDRBD:promote groupServiceproperty $id="cib-bootstrap-options" \ stonith-enabled="true" \ no-quorum-policy="ignore" \ maintenance-mode="false"

Page 19: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Performance comparison

Values with iSCSI

Downtime with storage-node failure

Page 20: Virtualisation on Linux and storage high-availability (C) 2011 - CS / MI Adfinis SyGroup AG

Questions?

(cu @ social event)

(C) 2011 - CS / MI Adfinis SyGroup AG