SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
buildacloud
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
SVDevOps
 

Tendances (20)

VM Autoscaling With CloudStack VR As Network Provider
VM Autoscaling With CloudStack VR As Network ProviderVM Autoscaling With CloudStack VR As Network Provider
VM Autoscaling With CloudStack VR As Network Provider
 
CloudStack and cloud-init
CloudStack and cloud-initCloudStack and cloud-init
CloudStack and cloud-init
 
NSX-T Architecture and Components.pptx
NSX-T Architecture and Components.pptxNSX-T Architecture and Components.pptx
NSX-T Architecture and Components.pptx
 
Ceph with CloudStack
Ceph with CloudStackCeph with CloudStack
Ceph with CloudStack
 
L’ Administration des Réseaux en Pratique
L’ Administration des Réseaux en PratiqueL’ Administration des Réseaux en Pratique
L’ Administration des Réseaux en Pratique
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
MikroTik & RouterOS
MikroTik & RouterOSMikroTik & RouterOS
MikroTik & RouterOS
 
監視の基礎から知る、ヤフーの大量クラスタ監視システムの仕組み #k8sjp
監視の基礎から知る、ヤフーの大量クラスタ監視システムの仕組み #k8sjp監視の基礎から知る、ヤフーの大量クラスタ監視システムの仕組み #k8sjp
監視の基礎から知る、ヤフーの大量クラスタ監視システムの仕組み #k8sjp
 
Background processing with hangfire
Background processing with hangfireBackground processing with hangfire
Background processing with hangfire
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
Debianの修正はどのように出荷されるか
Debianの修正はどのように出荷されるかDebianの修正はどのように出荷されるか
Debianの修正はどのように出荷されるか
 
NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月
NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月
NFVアプリケーションをOpenStack上で動かす為に - OpenStack最新情報セミナー 2017年7月
 
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
Troubleshooting Strategies for CloudStack Installations by Kirk Kosinski
 
[락플레이스] RHEL8.4 웨비나 발표자료
[락플레이스] RHEL8.4 웨비나 발표자료 [락플레이스] RHEL8.4 웨비나 발표자료
[락플레이스] RHEL8.4 웨비나 발표자료
 
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月 知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
 
Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개
 
Packer by HashiCorp
Packer by HashiCorpPacker by HashiCorp
Packer by HashiCorp
 
Docker Networking Deep Dive
Docker Networking Deep DiveDocker Networking Deep Dive
Docker Networking Deep Dive
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 

En vedette

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
 
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
Giuseppe Paterno'
 
Sito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVM
Sito_Group
 
Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)Introduction to OpenStack (Juno)
Introduction to OpenStack (Juno)
Krunal Jain
 

En vedette (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・アーキテクチャー概要
 

Similaire à Using CloudStack With Clustered LVM

2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.ppt2.1 Red_Hat_Cluster1.ppt
2.1 Red_Hat_Cluster1.ppt
Manoj603126
 

Similaire à 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