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

WebClusters, Redis
WebClusters, RedisWebClusters, Redis
WebClusters, Redis
Filip Tepper
 
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
Ohad Kravchick
 

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 (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

Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
FromDual GmbH
 

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

Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)Storage mit ceph (glt 2013)
Storage mit ceph (glt 2013)
hastexo
 

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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

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!