SlideShare uma empresa Scribd logo
1 de 13
Using CloudStack
                       with
                  Clustered LVM

Marcus Sorensen
BetterServers, Inc
What's LVM?
●   Logical Volume Manager
    –   Built on Linux device mapper modules
    –   Physical volumes create pools called volume
        groups
    –   Volume groups provide extents from which we
        obtain logical volumes
    –   Provides features like resizing, redundancy, thin
        provisioning, snapshots
What about the clustered part?
●   LVM can utilize a cluster manager such as corosync
    to syncronize LVM metadata between nodes
●   LVM has a configurable locking mechanism for
    metadata changes
    –   /etc/lvm/lvm.conf
         ●   locking_type
              –   1 is local (default)
              –   2 is external locking library
              –   3 is built-in clustered locking (depends on how LVM was compiled)
●   Locking handled by Corosync and DLM
    –   CMAN in RHEL/CentOS 6.x is corosync
    –   Ubuntu provides corosync as well
●   Read more about configuring a Red Hat cluster
Why use CLVM for Primary Storage?
●   Provides a way to utilize shared, block-based
    storage, such as iSCSI or Fibre Channel
●   Allows CloudStack to have a pool from which to
    carve out volumes
●   Block-based storage is high performance
●   Shared storage is required for live migrations
●   CLVM is relatively simple; it doesn't require HA
    resources or any of the more difficult configurations
    of a typical RedHat cluster.
Setting up the storage
1. Install a base RHEL/CentOS operating system
  on all cluster nodes
2. Install cluster software
  1. RHEL/CentOS: “yum install lvm2-cluster”
  2. Ubuntu: “apt-get install clvm”

3. Edit /etc/lvm/lvm.conf to change locking_type
4. Edit or create /etc/cluster/cluster.conf
5. Start services
6. Create volume group(s)
7. Add into CloudStack
/etc/lvm/lvm.conf
●   Set locking_type to 3
●   Other tunables to be aware of:
    –   wait_for_locks
    –   filter
/etc/cluster/cluster.conf
Example:
<?xml version="1.0"?>
     <cluster config_version="1" name="kvmcluster">
     <cman transport="udpu"/>
     <clusternodes>
             <clusternode name="192.168.10.11" nodeid="1">
                 <fence><method name="1"> <device name="fence_ipmitool" nodename="host1"/></method></fence>
             </clusternode>
             <clusternode name="192.168.10.12" nodeid="2">
                 <fence><method name="1"> <device name="fence_ipmitool" nodename="host2"/></method></fence>
             </clusternode>
             <clusternode name="192.168.10.13" nodeid="3">
                 <fence> <method name="1"> <device name="fence_ipmitool" nodename="host3"/></method></fence>
             </clusternode>
     </clusternodes>
     <fencedevices><fencedevice agent="fence_ipmitool" name="fence_ipmitool"/></fencedevices>
     <fence_daemon post_join_delay="60"/>
     <rm/>
</cluster>
Start Services
●   RHEL/CentOS
    –   service cman start
    –   service clvmd start
●   Ubuntu
    –   service cman start
    –   service clvm start
●   Check services:
    –   cman_tool status
    –   cman_tool services
●   Create volume groups
    –   Just use normal LVM commands on shared block devices
Add into CloudStack
Under the hood... briefly
●   Volume groups and logical volumes are managed as storage
    pools by libvirt in LibvirtStorageAdaptor
●   Pools are activated/deactivated, created/destroyed
    dynamically as needed
Limitations/bugs
●   Snapshots consist of LVM snapshot, copy
    snapshot to secondary, delete snapshot
●   Due to nature of templating, templates
    unnecessarily copied to primary storage
    before use (fixed in master)
●   New dm-thin module won't be of much use
    with current implementations for thin-
    provisioned LVM volumes
Looking to the future...
●   Refactor to use Edison's storage plugin
    framework
●   Utilize dm-thin for
    backingstore/clone/snapshot functionality
●   Could provide (limited) dm-thin based
    snapshot functionality directly via device-
    mapper
Questions

Mais conteúdo relacionado

Mais procurados

Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringShapeBlue
 
Ceph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsCeph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsKaran Singh
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionAlexander Kukushkin
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여Ji-Woong Choi
 
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법Young D
 
Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Schubert Zhang
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Novell
 
BlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year InBlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year InSage Weil
 
Continguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelContinguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelKernel TLV
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.jsXie ChengChao
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep diveTrinath Somanchi
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)Linaro
 
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...ShapeBlue
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdfAdrian Huang
 

Mais procurados (20)

Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
 
Ceph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsCeph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion Objects
 
Patroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companionPatroni: Kubernetes-native PostgreSQL companion
Patroni: Kubernetes-native PostgreSQL companion
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여
 
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
 
Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Red Hat Global File System (GFS)
Red Hat Global File System (GFS)
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
BlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year InBlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year In
 
Continguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelContinguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux Kernel
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.js
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStackMeetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStack
 
Planning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera ClusterPlanning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera Cluster
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep dive
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
 
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
 
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdf
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 

Destaque

Linux Cluster Concepts
Linux Cluster ConceptsLinux Cluster Concepts
Linux Cluster Conceptsnixsavy
 
Using the KVMhypervisor in CloudStack
Using the KVMhypervisor in CloudStackUsing the KVMhypervisor in CloudStack
Using the KVMhypervisor in CloudStackShapeBlue
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Giuseppe Paterno'
 
Scalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopScalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopChiradeep Vittal
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionMazenetsolution
 
Sito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito_Group
 
Building an Enterprise Cloud on OpenStack
Building an Enterprise Cloud on OpenStackBuilding an Enterprise Cloud on OpenStack
Building an Enterprise Cloud on OpenStackDavid Grizzanti
 
Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Krunal Jain
 
Logical Volume Manager. An Introduction
Logical Volume Manager. An IntroductionLogical Volume Manager. An Introduction
Logical Volume Manager. An IntroductionJuan A. Suárez Romero
 
Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ian Colle
 
Colour vision with lvm
Colour vision with lvmColour vision with lvm
Colour vision with lvmsurendra74
 
Rhel cluster basics 1
Rhel cluster basics   1Rhel cluster basics   1
Rhel cluster basics 1Manoj Singh
 
Storage Management using LVM
Storage Management using LVMStorage Management using LVM
Storage Management using LVMPriyank Kapadia
 
Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheetPrakash Ghosh
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)Dan Wendlandt
 
分散ストレージソフトウェアCeph・アーキテクチャー概要
分散ストレージソフトウェアCeph・アーキテクチャー概要分散ストレージソフトウェアCeph・アーキテクチャー概要
分散ストレージソフトウェアCeph・アーキテクチャー概要Etsuji Nakai
 
Ceph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross TurkCeph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross Turkbuildacloud
 

Destaque (20)

Linux Cluster Concepts
Linux Cluster ConceptsLinux Cluster Concepts
Linux Cluster Concepts
 
Using the KVMhypervisor in CloudStack
Using the KVMhypervisor in CloudStackUsing the KVMhypervisor in CloudStack
Using the KVMhypervisor in CloudStack
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2
 
Scalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache HadoopScalable Object Storage with Apache CloudStack and Apache Hadoop
Scalable Object Storage with Apache CloudStack and Apache Hadoop
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet Solution
 
Lvm advanced topics
Lvm advanced topicsLvm advanced topics
Lvm advanced topics
 
Sito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVM
 
Building an Enterprise Cloud on OpenStack
Building an Enterprise Cloud on OpenStackBuilding an Enterprise Cloud on OpenStack
Building an Enterprise Cloud on OpenStack
 
LVM
LVMLVM
LVM
 
Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
Logical Volume Manager. An Introduction
Logical Volume Manager. An IntroductionLogical Volume Manager. An Introduction
Logical Volume Manager. An Introduction
 
Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014
 
Colour vision with lvm
Colour vision with lvmColour vision with lvm
Colour vision with lvm
 
Rhel cluster basics 1
Rhel cluster basics   1Rhel cluster basics   1
Rhel cluster basics 1
 
Storage Management using LVM
Storage Management using LVMStorage Management using LVM
Storage Management using LVM
 
Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheet
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)
 
分散ストレージソフトウェアCeph・アーキテクチャー概要
分散ストレージソフトウェアCeph・アーキテクチャー概要分散ストレージソフトウェアCeph・アーキテクチャー概要
分散ストレージソフトウェアCeph・アーキテクチャー概要
 
Ceph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross TurkCeph Intro and Architectural Overview by Ross Turk
Ceph Intro and Architectural Overview by Ross Turk
 

Semelhante a Using CloudStack With Clustered LVM

Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security ParadigmAnis LARGUEM
 
Security on a Container Platform
Security on a Container PlatformSecurity on a Container Platform
Security on a Container PlatformAll Things Open
 
2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.ppt2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.pptManoj603126
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroupsKernel TLV
 
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...OpenNebula Project
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformAll Things Open
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformAll Things Open
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Neeraj Shrimali
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISORVanika Kapoor
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Boden Russell
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisorChing-Hsuan Yen
 
Enabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via KubernetesEnabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via Kubernetesmountpoint.io
 
Linux Security Overview
Linux Security OverviewLinux Security Overview
Linux Security OverviewKernel TLV
 
POUG2022_OracleDbNestInsideOut.pptx
POUG2022_OracleDbNestInsideOut.pptxPOUG2022_OracleDbNestInsideOut.pptx
POUG2022_OracleDbNestInsideOut.pptxMahmoud Hatem
 

Semelhante a Using CloudStack With Clustered LVM (20)

OpenStack Cinder
OpenStack CinderOpenStack Cinder
OpenStack Cinder
 
Docker Security Paradigm
Docker Security ParadigmDocker Security Paradigm
Docker Security Paradigm
 
Security on a Container Platform
Security on a Container PlatformSecurity on a Container Platform
Security on a Container Platform
 
2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.ppt2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.ppt
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroups
 
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...
OpenNebulaConf 2016 - Hypervisors and Containers Hands-on Workshop by Jaime M...
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
Secure container: Kata container and gVisor
Secure container: Kata container and gVisorSecure container: Kata container and gVisor
Secure container: Kata container and gVisor
 
Enabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via KubernetesEnabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via Kubernetes
 
Linux Security Overview
Linux Security OverviewLinux Security Overview
Linux Security Overview
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
POUG2022_OracleDbNestInsideOut.pptx
POUG2022_OracleDbNestInsideOut.pptxPOUG2022_OracleDbNestInsideOut.pptx
POUG2022_OracleDbNestInsideOut.pptx
 
Wissbi osdc pdf
Wissbi osdc pdfWissbi osdc pdf
Wissbi osdc pdf
 
.ppt
.ppt.ppt
.ppt
 

Using CloudStack With Clustered LVM

  • 1. Using CloudStack with Clustered LVM Marcus Sorensen BetterServers, Inc
  • 2. What's LVM? ● Logical Volume Manager – Built on Linux device mapper modules – Physical volumes create pools called volume groups – Volume groups provide extents from which we obtain logical volumes – Provides features like resizing, redundancy, thin provisioning, snapshots
  • 3. What about the clustered part? ● LVM can utilize a cluster manager such as corosync to syncronize LVM metadata between nodes ● LVM has a configurable locking mechanism for metadata changes – /etc/lvm/lvm.conf ● locking_type – 1 is local (default) – 2 is external locking library – 3 is built-in clustered locking (depends on how LVM was compiled) ● Locking handled by Corosync and DLM – CMAN in RHEL/CentOS 6.x is corosync – Ubuntu provides corosync as well ● Read more about configuring a Red Hat cluster
  • 4. Why use CLVM for Primary Storage? ● Provides a way to utilize shared, block-based storage, such as iSCSI or Fibre Channel ● Allows CloudStack to have a pool from which to carve out volumes ● Block-based storage is high performance ● Shared storage is required for live migrations ● CLVM is relatively simple; it doesn't require HA resources or any of the more difficult configurations of a typical RedHat cluster.
  • 5. Setting up the storage 1. Install a base RHEL/CentOS operating system on all cluster nodes 2. Install cluster software 1. RHEL/CentOS: “yum install lvm2-cluster” 2. Ubuntu: “apt-get install clvm” 3. Edit /etc/lvm/lvm.conf to change locking_type 4. Edit or create /etc/cluster/cluster.conf 5. Start services 6. Create volume group(s) 7. Add into CloudStack
  • 6. /etc/lvm/lvm.conf ● Set locking_type to 3 ● Other tunables to be aware of: – wait_for_locks – filter
  • 7. /etc/cluster/cluster.conf Example: <?xml version="1.0"?> <cluster config_version="1" name="kvmcluster"> <cman transport="udpu"/> <clusternodes> <clusternode name="192.168.10.11" nodeid="1"> <fence><method name="1"> <device name="fence_ipmitool" nodename="host1"/></method></fence> </clusternode> <clusternode name="192.168.10.12" nodeid="2"> <fence><method name="1"> <device name="fence_ipmitool" nodename="host2"/></method></fence> </clusternode> <clusternode name="192.168.10.13" nodeid="3"> <fence> <method name="1"> <device name="fence_ipmitool" nodename="host3"/></method></fence> </clusternode> </clusternodes> <fencedevices><fencedevice agent="fence_ipmitool" name="fence_ipmitool"/></fencedevices> <fence_daemon post_join_delay="60"/> <rm/> </cluster>
  • 8. Start Services ● RHEL/CentOS – service cman start – service clvmd start ● Ubuntu – service cman start – service clvm start ● Check services: – cman_tool status – cman_tool services ● Create volume groups – Just use normal LVM commands on shared block devices
  • 10. Under the hood... briefly ● Volume groups and logical volumes are managed as storage pools by libvirt in LibvirtStorageAdaptor ● Pools are activated/deactivated, created/destroyed dynamically as needed
  • 11. Limitations/bugs ● Snapshots consist of LVM snapshot, copy snapshot to secondary, delete snapshot ● Due to nature of templating, templates unnecessarily copied to primary storage before use (fixed in master) ● New dm-thin module won't be of much use with current implementations for thin- provisioned LVM volumes
  • 12. Looking to the future... ● Refactor to use Edison's storage plugin framework ● Utilize dm-thin for backingstore/clone/snapshot functionality ● Could provide (limited) dm-thin based snapshot functionality directly via device- mapper