Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!
DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!
DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!
Ebook279 pages52 minutes

DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Create an cluster on Linux, have not to be complicated and expensive. This book gives you an assistance for the cross-computer RAID1-System DRBD, build by LinBit, and helps you to create your special own cluster system.
In form of 'Listings' - practicle example-sessions, which can have bugs, error messages and debugging - the author shows, how you can use step by step DRBD, to create an easy and functionable Linux-Cluster.
Because the DRBD-Software and the configuration files are also usable on Windows, the shown examples can also run on this system!
In an own chapter it will be shown, how DRBD involes into an Veritas-Cluster.
Useful information for the system administration of Linux systems will be given in three appendices. The operation of the various Linux file systems is also explained.
LanguageEnglish
Publisherepubli
Release dateFeb 13, 2022
ISBN9783754950326
DRBD-Cookbook: How to create your own cluster solution, without SAN or NAS!

Related to DRBD-Cookbook

Related ebooks

Operating Systems For You

View More

Related articles

Reviews for DRBD-Cookbook

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    DRBD-Cookbook - Joerg Christian Seubert

    DRBD-Cookbook

    How to create your own cluster solution, without SAN or NAS!

    1. Edition

    Contents

    1  Introduction

    1.1  Syntax of that book

    1.2  Built-in bugs

    1.3  Hostnames

    2  Installation

    2.1  Software

    2.2  Requirements

    3  Preliminary considerations

    3.1  Disk drive – physically vs. LVM

    3.2  Filesystem on the disk device

    3.2.1  UFS / ext2

    3.2.2  ext3 / ext4

    3.2.3  xfs

    3.2.4  BtrFS

    3.2.5  OCFS2

    3.2.6  Conclusion

    4  Configuration-Basics on a two-node-cluster-array

    4.1  SSH-Configuration

    4.1.1  SSH-Key-Types

    4.1.2  Recipe: Generate and distribute SSH keys

    4.2  Configuration of the locale Disk devices

    4.2.1  Recipe: Create LVM volume via YaST

    4.2.2  Recipe: Create a LVM-Volume via shell

    4.3  DRBD configuration

    4.3.1  Performance

    4.3.2  /etc/drbd.conf

    4.3.3  /etc/drbd.d/global_common.conf

    4.3.4  Resourceconfiguration

    4.3.5  Resource Description:

    4.3.6  Alternative notation

    4.3.7  Ports

    4.3.8  Recipe: Command sequence for the basic configuration

    5  Data transmission in the backbone LAN

    5.1  Recipe: Backbone LAN in the DRBD configuration

    6  Multi-node cluster

    6.1  Stacking-Device

    6.1.1  Recipe: Commissioning a stacking device with DRBD8 under SLES11 SP4

    6.1.2  Recipe: Commissioning a stacking device with DRBD9 under OpenSuSE 15.1

    6.2  RAID1 over at least three nodes

    7  Hardened cluster

    7.1  Detecting the state of the firewall

    7.2  Firewallzones

    7.3  Build a new firewall-service

    7.4  Build a new zone

    7.5  Basics of a two-stage hardening concept

    7.5.1  Hardening with the firewall

    7.5.2  Hardening with the Secure-Shell-Options

    8  Increase / decrease the size of the DRBD device

    8.1  Unofficial method

    8.1.1  Concept

    8.1.2  Command sequence

    8.2  The official way

    9  Program your own cluster solution

    9.1  Configuration file

    9.1.1  Content of the configuration file

    9.2  Virtual IP-address

    9.2.1  Script explanation for my_virt_ip.pl:

    9.3  Make database switchable

    9.3.1  Script explanation for my_dev_switch.pl:

    9.4  Communication between cluster nodes - the Horcher

    9.4.1  Script explanation for my_horcher.pl:

    9.5  Controlscript

    9.5.1  Script explanation for my_control.pl:

    9.6  Service control scripts for systemd

    9.6.1  Explanation for mycluster_horcher.service:

    9.6.2  Explanation for mycluster_control.service:

    9.7  Initialization script for the cluster controller

    9.7.1  Explanation for my_service.pl:

    9.8  Maintenance

    9.9  General information about the scripts

    10  Include DRBD in Veritas Cluster

    10.1  Include DRBD as Veritas-Agent

    10.2  Increase or decrease a DRBD-Device, which is included in the Veritas-Cluster

    11  DRBD and Docker

    11.1  Preparation and first start of the container

    11.2  Work with the container

    12  Win-DRBD

    13  SSH-Configuration on SLE 15 / OpenSuSE Leap 15.x

    14  Creating a LVM-Volume-Group

    14.1  YaST

    14.2  Shell

    15  Stop, start, enable and disable services - a little tutorial

    15.1  Copying servicefiles

    15.2  Use services via YaST

    15.3  Operate services with systemctl

    16  Sources and disclaimer

    16.1  Sources

    16.1.1  Internet

    16.1.2  Books

    16.2  Disclaimer:

    17  About…

    17.1  …the book…

    17.2  …the author…

    17.3  Legal notice:

    1  

    Introduction

    If you want to build a cluster, sooner or later you face the problem that the data must be usable on all participating servers. This problem can be solved by transporting the data once per minute from the active cluster node to the passive cluster node.

    But what, if this copy job takes longer than one minute?

    In this case, you either have the situation that the copy jobs overtake each other and never end, because the cluster node in question does nothing else but ’copy’ - and ’nothing else’ means ’nothing else’ - or the data is outdated every time.

    Neither makes sense and is not desirable.

    If you have the additional situation that all cluster nodes must not only read the data but also write it, ’practical copying’ no longer makes any sense at all. Usually, this problem is solved by using a SAN or NAS.

    For a data center, where there are usually more than two machines running at 24 * 7 uptime, it may not be a problem to run one more machine per cluster group - this can be a ’disk pot’, known as a true SAN (storage area network), or it can be a network file server, known as a NAS (network-attached-storage).

    However, small businesses and home users face the problem of having to pay for a SAN or NAS.

    That’s where the DRBD - Distributed Replicated Block Device - product from LinBit (www.linbit.com) comes in.

    DRBD gives you the ability to connect two or more cluster nodes together without using a SAN or NAS as a data device. DRBD runs like a local RAID controller creating a mirror device (RAID 1) - but with local disks connected by a LAN.

    You can also use this variant in a large data center if your cluster needs to be independent of a SAN or NAS. For example, you can think of a monitoring server that monitors the SAN or NAS and has to run highly available, especially when the SAN or NAS is not running.

    This cookbook teaches the basics of a DRBD active-passive cluster, extended by further possibilities (three-node cluster, backbone LAN, deployment of DRBD on a Veritas cluster, creation of an own cluster via PERL, cluster configuration via hardware systems and many more) and demonstrates the procedures in the form of ’listings’.

    All examples are based on a test configuration with OpenSuSE Leap 15.1 (except 6.1.1) and can - with the necessary background knowledge - also be implemented in other Linux distributions.

    In the text number 6.1.1 the listing is done with SLES 11 SP 4 to show the commands and screen outputs of DRBD version 8 compared to DRBD version 9 because there are some differences.

    For using DRBD on Windows-Servers use chapter 12.

    1.1  

    Syntax of that book

    To distinguish keyboard inputs and on-screen outputs from the explanations, the commands and on-screen outputs are displayed as follows:

    hostname:~ # echo This is an example! 

    This is an example!

    In the scripts, the individual lines are numbered consecutively and the individual lines are briefly explained in tabular form in the text following the respective listing.

    This means that the commands of the recipes can be entered on the shell as shown in the

    Enjoying the preview?
    Page 1 of 1