SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackBackroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackShapeBlue
 
Deploying CloudStack with Ceph
Deploying CloudStack with CephDeploying CloudStack with Ceph
Deploying CloudStack with CephShapeBlue
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)Ian Choi
 
OpenStack and MySQL
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQLMatt Lord
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsGiacomo Vacca
 
Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region modeJoe Huang
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaArvind Kumar G.S
 
Curso Kubernetes CodeURJC
Curso Kubernetes CodeURJCCurso Kubernetes CodeURJC
Curso Kubernetes CodeURJCMicael Gallego
 
OpenStack DevStack Install - 1부 (All-in-one)
OpenStack DevStack Install - 1부 (All-in-one)OpenStack DevStack Install - 1부 (All-in-one)
OpenStack DevStack Install - 1부 (All-in-one)Ian Choi
 
Implementing CloudStack's VPC feature
Implementing CloudStack's VPC featureImplementing CloudStack's VPC feature
Implementing CloudStack's VPC featureMarcus L Sorensen
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Autoscale a self-healing cluster in OpenStack with Heat
Autoscale a self-healing cluster in OpenStack with HeatAutoscale a self-healing cluster in OpenStack with Heat
Autoscale a self-healing cluster in OpenStack with HeatRico Lin
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerizationBalint Pato
 
How to install Vertica in a single node.
How to install Vertica in a single node.How to install Vertica in a single node.
How to install Vertica in a single node.Anil Maharjan
 
OpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Project
 
CloudStack vs OpenStack
CloudStack vs OpenStackCloudStack vs OpenStack
CloudStack vs OpenStackVictor Zhang
 
Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorAmir Zuker
 
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개if kakao
 
Kvm and libvirt
Kvm and libvirtKvm and libvirt
Kvm and libvirtplarsen67
 

Was ist angesagt? (20)

Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStackBackroll: Production Grade KVM Backup Solution Integrated in CloudStack
Backroll: Production Grade KVM Backup Solution Integrated in CloudStack
 
Deploying CloudStack with Ceph
Deploying CloudStack with CephDeploying CloudStack with Ceph
Deploying CloudStack with Ceph
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)OpenStack DevStack Install - 2부 (Multi-nodes)
OpenStack DevStack Install - 2부 (Multi-nodes)
 
OpenStack and MySQL
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQL
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
 
Issues of OpenStack multi-region mode
Issues of OpenStack multi-region modeIssues of OpenStack multi-region mode
Issues of OpenStack multi-region mode
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Curso Kubernetes CodeURJC
Curso Kubernetes CodeURJCCurso Kubernetes CodeURJC
Curso Kubernetes CodeURJC
 
OpenStack DevStack Install - 1부 (All-in-one)
OpenStack DevStack Install - 1부 (All-in-one)OpenStack DevStack Install - 1부 (All-in-one)
OpenStack DevStack Install - 1부 (All-in-one)
 
Implementing CloudStack's VPC feature
Implementing CloudStack's VPC featureImplementing CloudStack's VPC feature
Implementing CloudStack's VPC feature
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Autoscale a self-healing cluster in OpenStack with Heat
Autoscale a self-healing cluster in OpenStack with HeatAutoscale a self-healing cluster in OpenStack with Heat
Autoscale a self-healing cluster in OpenStack with Heat
 
Intro to containerization
Intro to containerizationIntro to containerization
Intro to containerization
 
How to install Vertica in a single node.
How to install Vertica in a single node.How to install Vertica in a single node.
How to install Vertica in a single node.
 
OpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. MonteroOpenNebula Networking - Rubén S. Montero
OpenNebula Networking - Rubén S. Montero
 
CloudStack vs OpenStack
CloudStack vs OpenStackCloudStack vs OpenStack
CloudStack vs OpenStack
 
Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and Blazor
 
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
 
Kvm and libvirt
Kvm and libvirtKvm and libvirt
Kvm and libvirt
 

Andere mochten auch

Linux Cluster Concepts
Linux Cluster ConceptsLinux Cluster Concepts
Linux Cluster Conceptsnixsavy
 
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
 
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
 

Andere mochten auch (20)

Linux Cluster Concepts
Linux Cluster ConceptsLinux Cluster Concepts
Linux Cluster Concepts
 
Red Hat Global File System (GFS)
Red Hat Global File System (GFS)Red Hat Global File System (GFS)
Red Hat Global File System (GFS)
 
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・アーキテクチャー概要
 

Ähnlich wie 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
 

Ähnlich wie 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