About this ebook
- Install, configure, and manage a multi-node cluster running on CentOS Linux
- Manage your cluster resources and learn how to start, stop, and migrate resources from one host to another
- Designed as a step-by-step guide, this book will help you become a master of cluster nodes, cluster resources, and cluster services on CentOS 6 and CentOS 7
This book is targeted at system engineers and system administrators who want to upgrade their knowledge and skills in high availability and want to learn practically how to achieve high availability with CentOS Linux. You are expected to have good CentOS Linux knowledge and basic networking experience.
Related to CentOS High Availability
Related ebooks
Troubleshooting OpenVPN Rating: 0 out of 5 stars0 ratingsTroubleshooting CentOS Rating: 0 out of 5 stars0 ratingsPractical Linux Security Cookbook Rating: 0 out of 5 stars0 ratingsCentOS System Administration Essentials Rating: 0 out of 5 stars0 ratingsCentOS High Performance Rating: 0 out of 5 stars0 ratingsInstant Debian - Build a Web Server Rating: 0 out of 5 stars0 ratingsInstant Citrix XenApp Rating: 5 out of 5 stars5/5PostgreSQL 9 Administration Cookbook LITE: Configuration, Monitoring and Maintenance Rating: 3 out of 5 stars3/5Learning SaltStack - Second Edition Rating: 0 out of 5 stars0 ratingsMastering Linux Shell Scripting Rating: 4 out of 5 stars4/5Ubuntu Server Essentials Rating: 0 out of 5 stars0 ratingsWorking with Linux – Quick Hacks for the Command Line Rating: 5 out of 5 stars5/5Mastering the Nmap Scripting Engine Rating: 0 out of 5 stars0 ratingsNginx Essentials Rating: 0 out of 5 stars0 ratingsMastering Puppet Rating: 0 out of 5 stars0 ratingsInstant Play Framework Starter Rating: 0 out of 5 stars0 ratingsLearning CoreOS Rating: 0 out of 5 stars0 ratingsPostgreSQL 9 Administration Cookbook: LITE Edition Rating: 3 out of 5 stars3/5Hyper-V 2016 Best Practices Rating: 0 out of 5 stars0 ratingsMastering OpenStack Rating: 1 out of 5 stars1/5Implementing Samba 4 Rating: 0 out of 5 stars0 ratingsNmap Essentials Rating: 4 out of 5 stars4/5Nginx Troubleshooting Rating: 0 out of 5 stars0 ratingsMastering Ceph Rating: 0 out of 5 stars0 ratingsExtending Docker Rating: 5 out of 5 stars5/5Learning SaltStack Rating: 4 out of 5 stars4/5
Operating Systems For You
Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5MacBook Pro User Manual: 2022 MacBook Pro User Guide for beginners and seniors to Master Macbook Pro like a Pro Rating: 0 out of 5 stars0 ratingsLinux Bible Rating: 0 out of 5 stars0 ratingsLinux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Apple Card and Apple Pay: A Ridiculously Simple Guide to Mobile Payments Rating: 0 out of 5 stars0 ratingsThe Linux Command Line Beginner's Guide Rating: 4 out of 5 stars4/5Help! iOS 17 - iPhone: How to Use iOS17 Rating: 0 out of 5 stars0 ratingsBash Command Line Pro Tips Rating: 5 out of 5 stars5/5Ubuntu Linux Bible Rating: 0 out of 5 stars0 ratingsMake Your PC Stable and Fast: What Microsoft Forgot to Tell You Rating: 4 out of 5 stars4/5iPhone Unlocked Rating: 0 out of 5 stars0 ratingsPowerShell: A Beginner's Guide to Windows PowerShell Rating: 4 out of 5 stars4/5Windows 11 For Dummies Rating: 0 out of 5 stars0 ratingsmacOS Sonoma For Dummies Rating: 0 out of 5 stars0 ratingsExploring Windows 11: The Illustrated, Practical Guide to Using Microsoft Windows Rating: 0 out of 5 stars0 ratingsMastering Apple MacBook - MacBook Pro, MacBook Air, MacOS Ultimate User Guide Rating: 1 out of 5 stars1/5Linux for Beginners: Linux Command Line, Linux Programming and Linux Operating System Rating: 4 out of 5 stars4/5Raspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsHacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5XDA Developers' Android Hacker's Toolkit: The Complete Guide to Rooting, ROMs and Theming Rating: 2 out of 5 stars2/5Mac Unlocked: Everything You Need to Know to Get Cracking in macOS Big Sur Rating: 0 out of 5 stars0 ratingsNetworking for System Administrators: IT Mastery, #5 Rating: 5 out of 5 stars5/5The Darknet Superpack Rating: 0 out of 5 stars0 ratingsTor Darknet Bundle: Master the Art of Invisibility Rating: 0 out of 5 stars0 ratingsLinux Basics for Hackers: Getting Started with Networking, Scripting, and Security in Kali Rating: 3 out of 5 stars3/5
Reviews for CentOS High Availability
1 rating1 review
- Rating: 5 out of 5 stars5/5
Oct 17, 2021
this is an excellent book. It helps you to set up an HA cluster
Book preview
CentOS High Availability - Mitja Resman
Table of Contents
CentOS High Availability
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with High Availability
What is high availability?
System design
Computer clusters
High-availability solutions
Summary
2. Meet the Cluster Stack on CentOS
Cluster stack software
The cluster communication layer
The cluster messaging and membership service
Quorum
The cluster resource management layer
A theoretical cluster service example
Cluster stack on CentOS Linux
Preparing for cluster stack software installation
Summary
3. Cluster Stack Software on CentOS 6
Cluster infrastructure
Cluster operating system preparation
Installing and configuring Corosync
Installing and configuring CMAN
Installing and configuring RGManager
Summary
4. Resource Manager on CentOS 6
Working with RGManager
Configuring failover domains
Adding cluster resources and services
Resources
Services
Managing cluster services
Removing cluster resources and services
Summary
5. Playing with Cluster Nodes on CentOS 6
Adding a new cluster node
Removing a cluster node
Summary
6. Fencing on CentOS 6
Fencing
Fencing configuration
APC switch fencing
IPMI management board fencing
HP iLO management board fencing
Fencing test
Fence master node
Fence check
Fence node
Summary
7. Testing Failover on CentOS 6
Hardware failure
Network failure
Summary
8. Two-node Cluster Considerations on CentOS 6
Quorum in a two-node cluster
Two-node cluster configuration
Quorum disk
Summary
9. Cluster Stack Software on CentOS 7
Cluster infrastructure
Cluster operating system preparation
Network configuration
NTP configuration
DNS configuration
Installing and configuring Corosync
Installing and configuring Pacemaker
Summary
10. Resource Manager on CentOS 7
Working with pcs
Adding cluster resources, constraints, and resource groups
Configuring resources
Configuring resource constraints
Configuring resource groups
Managing resources
Moving resources around
Stopping resources
Starting resources
Banning resources
Clearing resource constraints
Removing cluster constraints, resource groups, and resources
Removing resource constraints
Removing resource groups
Removing resources
Summary
11. Playing with Cluster Nodes on CentOS 7
Adding a new cluster node
Cluster node standby mode
Removing a cluster node
Summary
12. STONITH on CentOS 7
Fencing
Configuring fence devices
APC switch fencing
IPMI management board fencing
HP iLO management board fencing
Fence test
Summary
13. Testing Failover on CentOS 7
Hardware failure
Network failure
Summary
14. Two-node Cluster Considerations on CentOS 7
Quorum in a two-node cluster
Two-node cluster configuration
Summary
Index
CentOS High Availability
CentOS High Availability
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1220415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-248-5
www.packtpub.com
Credits
Author
Mitja Resman
Reviewers
Denis Fateyev
Christophe Grenier
Commissioning Editor
Veena Pagare
Acquisition Editor
Reshma Raman
Content Development Editor
Neeshma Ramakrishnan
Technical Editor
Abhishek R. Kotian
Copy Editor
Vikrant Phadke
Project Coordinator
Danuta Jones
Proofreaders
Stephen Copestake
Safis Editing
Paul Hindle
Indexer
Rekha Nair
Production Coordinator
Melwyn D'sa
Cover Work
Melwyn D'sa
About the Author
Mitja Resman hails from a small, beautiful country called Slovenia in south-central Europe. He is a fan of Linux and also an open source enthusiast. He is a Red Hat Certified Engineer and Linux Professional Institute professional. Working as a system administrator, Mitja gained years of professional experience with open source software and Linux system administration on local and international projects. The Swiss Army Knife syndrome makes him an expert in the field of VMware virtualization, Microsoft system administration, and more recently, Android system administration.
Mitja has a strong desire to learn, develop, and share knowledge with others. This is the reason he started a blog called GeekPeek.Net. It provides CentOS Linux guides and how-to articles covering all sorts of topics appropriate for both beginners and advanced users. Mitja is also a devoted father and husband. His daughter and wife are the ones who take his mind off the geek stuff and make him appreciate life and look forward to the things to come.
I would like to thank my wife for putting up with my late night writing sessions and for all the support I got when I decided to write this book. I would also like to thank all of my family for the words of encouragement at the time of writing this book. Also, a special thanks to my friend who introduced me to Linux many years ago.
About the Reviewers
Denis Fateyev holds a Master's degree in Computer Science, and has been working with Linux for more than 10 years, mostly with Red Hat and CentOS. He currently works as a Perl programmer and a DevOps for a small German company. Being a keen participant in the open source community, he is a package maintainer in the Fedora and Repoforge projects. Foreign languages (German and Spanish) and linguistics are also his passion.
Denis can be reached at <[email protected]>.
Christophe Grenier holds a diploma from ESIEA Graduate School of Engineering, and is the director of operations at Global SP—a French IT service provider. He has more than 15 years of experience in Red Hat Linux systems. He uses the Corosync cluster solution from CentOS 5 onwards. Christophe teaches several courses about Linux and IT Security in Sécurité de l'Information et des Systèmes at ESIEA Mastère Spécialisé. He is also known for the open source data recovery utilities, TestDisk, and PhotoRec.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
The book will guide you through the process of installing, configuring, and administering a multinode computer cluster on CentOS version 6 and 7 using two different cluster suites with respect to the CentOS version.
What this book covers
Chapter 1, Getting Started with High Availability, provides facts about high availability.
Chapter 2, Meet the Cluster Stack on CentOS, shows you how cluster stack software works as a whole to provide high availability.
Chapter 3, Cluster Stack Software on CentOS 6, covers installation and configuration of cluster stack software on CentOS 6.
Chapter 4, Resource Manager on CentOS 6, teaches you how to manage your cluster resources and services with the RGManager resource manager on CentOS 6.
Chapter 5, Playing with Cluster Nodes on CentOS 6, explains how to manage and administer cluster nodes on CentOS 6.
Chapter 6, Fencing on CentOS 6, provides the details and recommendations on the quorum disk on CentOS 6.
Chapter 7, Testing Failover on CentOS 6, discovers cluster node fencing on CentOS 6.
Chapter 8, Two-node Cluster Considerations on CentOS 6, covers some final cluster failover tests on CentOS 6.
Chapter 9, Cluster Stack Software on CentOS 7, shows you how to install and configure cluster stack software on CentOS 7.
Chapter 10, Resource Manager on CentOS 7, teaches you how to manage your cluster resources and services with the Pacemaker resource manager on CentOS 7.
Chapter 11, Playing with Cluster Nodes on CentOS 7, explains how to manage and administer cluster nodes on CentOS 7.
Chapter 12, STONITH on CentOS 7, introduces the details and recommendations on quorum disk on CentOS 7.
Chapter 13, Testing Failover on CentOS 7, covers cluster node fencing, the so-called STONITH, on CentOS 7.
Chapter 14, Two-node Cluster Considerations on CentOS 7, provides some final cluster failover tests on CentOS 7.
What you need for this book
To closely follow the guides provided in this book, three virtual or physical machines with a working CentOS version 6 or 7 installation are required. The machines must have Internet connectivity to provide successful software installation, and local network connectivity to provide normal cluster operation.
Who this book is for
This book is targeted at system engineers and system administrators who want to upgrade their knowledge and skills in high availability, and want to learn how to practically achieve high availability with CentOS Linux. You are expected to have good knowledge of CentOS Linux and basic networking experience.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: If you want to change this, edit the NTP configuration file in /etc/ntp.conf.
Any command-line input or output is written as follows:
[root@node-1