SlideShare una empresa de Scribd logo
1 de 36
High Availability Sprint
From the brink of disaster to the Zen of Pacemaker


                     Florian Haas (hastexo)
                        Tim Serong (SUSE)
                  Andrew Beekhof (Red Hat)
HA Sprint: Get Prepared!

●   Tutorial instructions at: http://goo.gl/vinL0
●   Follow along -- or just watch! (up to you)
Visual Cues & Clues

How to follow this talk easily
This layout means:

            Would you please treat us
to the courtesy of your kind attention?
This layout means:

●   Here's how we do this,
●   and this,
●   and this.
Our virtual environment
An Overview
of the Linux HA stack
Application Interface   MySQL RA



Cluster Resource Mgmt   Pacemaker




Cluster Messaging       Corosync



Storage Replication
(optional)               DRBD
Physical           Physical
         Host               Host




        MySQL
        Master




MySQL   MySQL      MySQL    App        App
Slave   Slave      Slave   Server     Server
Physical           Physical
         Host               Host




                           MySQL
                           Master




MySQL   MySQL      MySQL    App        App
Slave   Slave      Slave   Server     Server
DRBD

      http://www.hastexo.com/knowledge/drbd
                                                 http://www.drbd.org


DRBD & the DRBD logo are registered trademarks of Linbit Information Technologies
Creating a DRBD resource

●   Name:           mysql
●   Device name:    /dev/drbd0
●   Backing disk:   /dev/sdb1
●   Meta data:      internal
●   Replication:    192.168.133.111 ↔ 112


●   Filesystem:     ext3
Corosync

http://www.hastexo.com/knowledge/corosync
                   http://www.corosync.org
Creating a Corosync Cluster

●   Enable secauth
●   2 rings, RRP mode: active
●   Multicast addresses: 239.255.42.0 and .1
●   Network addresses: 192.168.122.0 and .
    133.0
●   No logging to files, syslog only
●   Start Corosync
●   Check connectivity
●   Check membership
Pacemaker

http://www.hastexo.com/knowledge/pacemaker
                   http://www.clusterlabs.org
Create a Pacemaker Cluster

●   Add the “pacemaker” service to
    /etc/corosync.d
●   Use ver: 1
●   Restart corosync
●   Start pacemakerd
●   Verify both nodes have joined the cluster
    (crm_mon)
STONITH/Fencing
Setting up the cluster

●   Open the shell with crm configure
●   Set no-quorum-policy to ignore
●   Disable STONITH
    ○   Kids, don't do this at home!
●   Commit the configuration
Pacemaker Resources
Started




start             stop




        Stopped
Master/Slave Sets
Started                  Started




start             stop   start             stop




        Stopped                  Stopped
Master




                         promote             demote




         Slave                      Slave




start             stop    start               stop




        Stopped                    Stopped
Adding a DRBD Master/Slave Set

●   Create the DRBD primitive p_drbd_mysql
    ○   Use the ocf:linbit:drbd RA
    ○   Add 2 monitor operations
        (role=Master, role=Slave) with non-equal
        intervals
●   Wrap it in a master/slave set
    ○   notify=true, clone-max=2, master-max=1
●   Commit the configuration
●   Watch the cluster promote
Constraints
Creating a Filesystem

●   Add the Filesystem resource
    ○   Name:             p_fs_mysql
    ○   Device:           /dev/drbd0
    ○   Directory:        /var/lib/mysql
    ○   File system type:    ext3
●   Add required order & colocation
    constraints
Groups
Add a Group

●   Create the g_mysql resource group
●   Add p_fs_mysql and p_ip_mysql
Add the MySQL resource

●   Run mysql_install_db
●   Create an ocf:heartbeat:mysql
    primitive p_mysql
●   Set additional_parameters:
    --bind-address 192.168.122.110
●   Add resource level monitoring
●   Add it to the g_mysql group
●   Watch the constraints update
    automagically
●   Commit, Rejoice!
One more thing...
Physical           Physical
         Host               Host




                           MySQL
                           Master




MySQL   MySQL      MySQL    App        App
Slave   Slave      Slave   Server     Server
Physical           Physical
         Host               Host




                           MySQL
                           Master




MySQL   MySQL      MySQL    App        App
Slave   Slave      Slave   Server     Server
Physical                       Physical
                 Host                           Host




                MySQL
                Master       InnoDB Recovery




        Umm..                WTF?              Hurry up!




MySQL           MySQL        MySQL               App        App
Slave           Slave        Slave              Server     Server




                 Booooring
Physical           Physical
         Host              Host




        MySQL
        Master




MySQL   MySQL      MySQL        App      App
Slave   Slave      Slave       Server   Server
Further Information

                  http://www.clusterlabs.org
                         http://www.drbd.org
http://www.suse.com/products/highavailability
                    http://www.hastexo.com
Liked this talk?

●   Go to www.hastexo.com/shoutbox
●   Log in
    (you can just use your OpenID from
    Wordpress, Blogger, Yahoo, Google Apps,
    Google Profile)
●   Leave us a message!

Más contenido relacionado

La actualidad más candente

Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerGiuseppe Maxia
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.jsNaing Lin Aung
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installerGiuseppe Maxia
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storageZhou Weitao
 
Nuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSNuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSMatteo Moretti
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redisKris Jeong
 
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案Hua Chu
 
WebClusters, Redis
WebClusters, RedisWebClusters, Redis
WebClusters, RedisFilip Tepper
 
A simple introduction to redis
A simple introduction to redisA simple introduction to redis
A simple introduction to redisZhichao Liang
 
Guava Overview Part 2 Bucharest JUG #2
Guava Overview Part 2 Bucharest JUG #2 Guava Overview Part 2 Bucharest JUG #2
Guava Overview Part 2 Bucharest JUG #2 Andrei Savu
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then someOhad Kravchick
 
Redis, another step on the road
Redis, another step on the roadRedis, another step on the road
Redis, another step on the roadYi-Feng Tzeng
 
NginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniquesNginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniquesClaudio Borges
 
Powershell dcpp
Powershell dcppPowershell dcpp
Powershell dcppartisriva
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practiceEugene Fidelin
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture ForumChristopher Spring
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 

La actualidad más candente (20)

Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
Quick Introduction to Node.js
Quick Introduction to Node.jsQuick Introduction to Node.js
Quick Introduction to Node.js
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storage
 
Nuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSNuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWS
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redis
 
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案
TWJUG 2016 - Mogilefs, 簡約可靠的儲存方案
 
WebClusters, Redis
WebClusters, RedisWebClusters, Redis
WebClusters, Redis
 
Guava
GuavaGuava
Guava
 
A simple introduction to redis
A simple introduction to redisA simple introduction to redis
A simple introduction to redis
 
Redis acc
Redis accRedis acc
Redis acc
 
Guava Overview Part 2 Bucharest JUG #2
Guava Overview Part 2 Bucharest JUG #2 Guava Overview Part 2 Bucharest JUG #2
Guava Overview Part 2 Bucharest JUG #2
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
 
Redis, another step on the road
Redis, another step on the roadRedis, another step on the road
Redis, another step on the road
 
NginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniquesNginX - good practices, tips and advanced techniques
NginX - good practices, tips and advanced techniques
 
Powershell dcpp
Powershell dcppPowershell dcpp
Powershell dcpp
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
Redis overview for Software Architecture Forum
Redis overview for Software Architecture ForumRedis overview for Software Architecture Forum
Redis overview for Software Architecture Forum
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 

Destacado

Storage with Ceph (OSDC 2013)
Storage with Ceph (OSDC 2013)Storage with Ceph (OSDC 2013)
Storage with Ceph (OSDC 2013)hastexo
 
Storage with ceph (osdc 2013)
Storage with ceph (osdc 2013)Storage with ceph (osdc 2013)
Storage with ceph (osdc 2013)Martin Loschwitz
 
CloudKC: Evolution of Network Virtualization
CloudKC: Evolution of Network VirtualizationCloudKC: Evolution of Network Virtualization
CloudKC: Evolution of Network VirtualizationCynthia Thomas
 
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...Cloud Native Day Tel Aviv
 
Openstack Basic with Neutron
Openstack Basic with NeutronOpenstack Basic with Neutron
Openstack Basic with NeutronKwonSun Bae
 
OpenStack Neutron Tutorial
OpenStack Neutron TutorialOpenStack Neutron Tutorial
OpenStack Neutron Tutorialmestery
 

Destacado (6)

Storage with Ceph (OSDC 2013)
Storage with Ceph (OSDC 2013)Storage with Ceph (OSDC 2013)
Storage with Ceph (OSDC 2013)
 
Storage with ceph (osdc 2013)
Storage with ceph (osdc 2013)Storage with ceph (osdc 2013)
Storage with ceph (osdc 2013)
 
CloudKC: Evolution of Network Virtualization
CloudKC: Evolution of Network VirtualizationCloudKC: Evolution of Network Virtualization
CloudKC: Evolution of Network Virtualization
 
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...
Florian Haas, hastexo - heat, cloud-init and cloud-config: OpenStack Orchestr...
 
Openstack Basic with Neutron
Openstack Basic with NeutronOpenstack Basic with Neutron
Openstack Basic with Neutron
 
OpenStack Neutron Tutorial
OpenStack Neutron TutorialOpenStack Neutron Tutorial
OpenStack Neutron Tutorial
 

Similar a LCA 2012: High Availability Sprint

MySQL High Availability Deep Dive
MySQL High Availability Deep DiveMySQL High Availability Deep Dive
MySQL High Availability Deep Divehastexo
 
Malware analysis
Malware analysisMalware analysis
Malware analysisxabean
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction Robert Reiz
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryOlivier DASINI
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesWordCamp New Zealand
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installationSumitra Pundlik
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Whirr dev-up-puppetconf2011
Whirr dev-up-puppetconf2011Whirr dev-up-puppetconf2011
Whirr dev-up-puppetconf2011Puppet
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixFromDual GmbH
 
OpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayOpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayDan Radez
 
MongoDB Management & Ansible
MongoDB Management & AnsibleMongoDB Management & Ansible
MongoDB Management & AnsibleMongoDB
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia DatabasesJaime Crespo
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 

Similar a LCA 2012: High Availability Sprint (20)

MySQL High Availability Deep Dive
MySQL High Availability Deep DiveMySQL High Availability Deep Dive
MySQL High Availability Deep Dive
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
Capistrano
CapistranoCapistrano
Capistrano
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installation
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Whirr dev-up-puppetconf2011
Whirr dev-up-puppetconf2011Whirr dev-up-puppetconf2011
Whirr dev-up-puppetconf2011
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
 
OpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage DayOpenStack Tokyo Meeup - Gluster Storage Day
OpenStack Tokyo Meeup - Gluster Storage Day
 
MongoDB Management & Ansible
MongoDB Management & AnsibleMongoDB Management & Ansible
MongoDB Management & Ansible
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 

Más de hastexo

Hands On Trove: Database as a Service in OpenStack
Hands On Trove: Database as a Service in OpenStack Hands On Trove: Database as a Service in OpenStack
Hands On Trove: Database as a Service in OpenStack hastexo
 
Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)hastexo
 
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)Mit OpenStack zur eigenen Cloud (LinuxTag 2012)
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)hastexo
 
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)hastexo
 
Mit OpenStack zur eigenen Cloud (GLT 2012)
Mit OpenStack zur eigenen Cloud (GLT 2012)Mit OpenStack zur eigenen Cloud (GLT 2012)
Mit OpenStack zur eigenen Cloud (GLT 2012)hastexo
 
Mit OpenStack zur eigenen Cloud (OSDC 2012)
Mit OpenStack zur eigenen Cloud (OSDC 2012)Mit OpenStack zur eigenen Cloud (OSDC 2012)
Mit OpenStack zur eigenen Cloud (OSDC 2012)hastexo
 
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aber
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und AberGlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aber
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aberhastexo
 
Mit OpenStack zur eigenen Cloud
Mit OpenStack zur eigenen CloudMit OpenStack zur eigenen Cloud
Mit OpenStack zur eigenen Cloudhastexo
 
Storage Replication in High-Performance High-Availability Environments
Storage Replication in High-Performance High-Availability EnvironmentsStorage Replication in High-Performance High-Availability Environments
Storage Replication in High-Performance High-Availability Environmentshastexo
 
Fencing and Maintaining Sanity in High Availability Clusters
Fencing and Maintaining Sanity in High Availability ClustersFencing and Maintaining Sanity in High Availability Clusters
Fencing and Maintaining Sanity in High Availability Clustershastexo
 

Más de hastexo (10)

Hands On Trove: Database as a Service in OpenStack
Hands On Trove: Database as a Service in OpenStack Hands On Trove: Database as a Service in OpenStack
Hands On Trove: Database as a Service in OpenStack
 
Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)
 
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)Mit OpenStack zur eigenen Cloud (LinuxTag 2012)
Mit OpenStack zur eigenen Cloud (LinuxTag 2012)
 
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)
Mit OpenStack zur eigenen Cloud (LinuxWochen Wien, 2012)
 
Mit OpenStack zur eigenen Cloud (GLT 2012)
Mit OpenStack zur eigenen Cloud (GLT 2012)Mit OpenStack zur eigenen Cloud (GLT 2012)
Mit OpenStack zur eigenen Cloud (GLT 2012)
 
Mit OpenStack zur eigenen Cloud (OSDC 2012)
Mit OpenStack zur eigenen Cloud (OSDC 2012)Mit OpenStack zur eigenen Cloud (OSDC 2012)
Mit OpenStack zur eigenen Cloud (OSDC 2012)
 
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aber
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und AberGlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aber
GlusterFS und Ceph: Skalierbares Storage ohne Wenn und Aber
 
Mit OpenStack zur eigenen Cloud
Mit OpenStack zur eigenen CloudMit OpenStack zur eigenen Cloud
Mit OpenStack zur eigenen Cloud
 
Storage Replication in High-Performance High-Availability Environments
Storage Replication in High-Performance High-Availability EnvironmentsStorage Replication in High-Performance High-Availability Environments
Storage Replication in High-Performance High-Availability Environments
 
Fencing and Maintaining Sanity in High Availability Clusters
Fencing and Maintaining Sanity in High Availability ClustersFencing and Maintaining Sanity in High Availability Clusters
Fencing and Maintaining Sanity in High Availability Clusters
 

Último

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 

Último (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 

LCA 2012: High Availability Sprint

  • 1. High Availability Sprint From the brink of disaster to the Zen of Pacemaker Florian Haas (hastexo) Tim Serong (SUSE) Andrew Beekhof (Red Hat)
  • 2. HA Sprint: Get Prepared! ● Tutorial instructions at: http://goo.gl/vinL0 ● Follow along -- or just watch! (up to you)
  • 3. Visual Cues & Clues How to follow this talk easily
  • 4. This layout means: Would you please treat us to the courtesy of your kind attention?
  • 5. This layout means: ● Here's how we do this, ● and this, ● and this.
  • 7. An Overview of the Linux HA stack
  • 8. Application Interface MySQL RA Cluster Resource Mgmt Pacemaker Cluster Messaging Corosync Storage Replication (optional) DRBD
  • 9. Physical Physical Host Host MySQL Master MySQL MySQL MySQL App App Slave Slave Slave Server Server
  • 10. Physical Physical Host Host MySQL Master MySQL MySQL MySQL App App Slave Slave Slave Server Server
  • 11. DRBD http://www.hastexo.com/knowledge/drbd http://www.drbd.org DRBD & the DRBD logo are registered trademarks of Linbit Information Technologies
  • 12. Creating a DRBD resource ● Name: mysql ● Device name: /dev/drbd0 ● Backing disk: /dev/sdb1 ● Meta data: internal ● Replication: 192.168.133.111 ↔ 112 ● Filesystem: ext3
  • 14. Creating a Corosync Cluster ● Enable secauth ● 2 rings, RRP mode: active ● Multicast addresses: 239.255.42.0 and .1 ● Network addresses: 192.168.122.0 and . 133.0 ● No logging to files, syslog only ● Start Corosync ● Check connectivity ● Check membership
  • 16. Create a Pacemaker Cluster ● Add the “pacemaker” service to /etc/corosync.d ● Use ver: 1 ● Restart corosync ● Start pacemakerd ● Verify both nodes have joined the cluster (crm_mon)
  • 18. Setting up the cluster ● Open the shell with crm configure ● Set no-quorum-policy to ignore ● Disable STONITH ○ Kids, don't do this at home! ● Commit the configuration
  • 20. Started start stop Stopped
  • 22. Started Started start stop start stop Stopped Stopped
  • 23. Master promote demote Slave Slave start stop start stop Stopped Stopped
  • 24. Adding a DRBD Master/Slave Set ● Create the DRBD primitive p_drbd_mysql ○ Use the ocf:linbit:drbd RA ○ Add 2 monitor operations (role=Master, role=Slave) with non-equal intervals ● Wrap it in a master/slave set ○ notify=true, clone-max=2, master-max=1 ● Commit the configuration ● Watch the cluster promote
  • 26. Creating a Filesystem ● Add the Filesystem resource ○ Name: p_fs_mysql ○ Device: /dev/drbd0 ○ Directory: /var/lib/mysql ○ File system type: ext3 ● Add required order & colocation constraints
  • 28. Add a Group ● Create the g_mysql resource group ● Add p_fs_mysql and p_ip_mysql
  • 29. Add the MySQL resource ● Run mysql_install_db ● Create an ocf:heartbeat:mysql primitive p_mysql ● Set additional_parameters: --bind-address 192.168.122.110 ● Add resource level monitoring ● Add it to the g_mysql group ● Watch the constraints update automagically ● Commit, Rejoice!
  • 31. Physical Physical Host Host MySQL Master MySQL MySQL MySQL App App Slave Slave Slave Server Server
  • 32. Physical Physical Host Host MySQL Master MySQL MySQL MySQL App App Slave Slave Slave Server Server
  • 33. Physical Physical Host Host MySQL Master InnoDB Recovery Umm.. WTF? Hurry up! MySQL MySQL MySQL App App Slave Slave Slave Server Server Booooring
  • 34. Physical Physical Host Host MySQL Master MySQL MySQL MySQL App App Slave Slave Slave Server Server
  • 35. Further Information http://www.clusterlabs.org http://www.drbd.org http://www.suse.com/products/highavailability http://www.hastexo.com
  • 36. Liked this talk? ● Go to www.hastexo.com/shoutbox ● Log in (you can just use your OpenID from Wordpress, Blogger, Yahoo, Google Apps, Google Profile) ● Leave us a message!