DRBD-Cookbook. Joerg Christian Seubert
Чтение книги онлайн.

Читать онлайн книгу DRBD-Cookbook - Joerg Christian Seubert страница 3

Название: DRBD-Cookbook

Автор: Joerg Christian Seubert

Издательство: Bookwire

Жанр: Математика

Серия:

isbn: 9783754950326

isbn:

СКАЧАТЬ

      pluto:~ # zypper search drbd

      Loading repository data...

      Reading installed packages...

      S | Name | Summary |

      --+---------------------------+------------------------------------------------------------+-

       | drbd | Linux driver for the "Distributed␣Replicated␣Block␣Device" |

       | drbd-formula | DRBD deployment salt formula |

       | drbd-kmp-default | Kernel driver |

       | drbd-kmp-preempt | Kernel driver |

       | drbd-utils | Distributed Replicated Block Device |

       | drbdmanage | DRBD distributed resource management utility |

       | yast2-drbd | YaST2 - DRBD Configuration |

      pluto:~ #

      2.2 Requirements

      "The system have to run!“

      Admittedly, this sentence sounds rather stupid with regard to the minimum requirements of an installation - especially in a technical book. However, the fact is that the DRBD software does not have any special minimum requirements for the equipment of the cluster nodes, which is due to the fact that the DRBD function is integrated into the Linux kernel.

      Equip your cluster nodes to meet your requirements and ensure that the high availability application runs properly on the deployed platform. With regard to synchronization, there are a few more notes.

      To create this book, I installed two virtual machines on a laptop that had the "fabulous" memory size of 4 GB and a quad processor running at 2.16 GHz.

      This might be enough for a workstation, laptop or desktop, but for a server or host this computer is a bit tight.

      The two “VMs” on this laptop each have 1 CPU and 1 GB RAM.

      In our case, the LAN connection is established by a single LAN adapter with a speed of 10 Mb/s - sufficient for home use, for a server …well ….

      As I said, for a server environment that has a little more work to do than present "It works" via apache, this hardware configuration would be considered lean. But to show that it basically works, this configuration is still sufficient.

      Depending on the size of the disk partitions you want to include in this RAID 1, you should consider setting up a separate LAN for disk synchronization (backend LAN). However, you should be careful about the speed of synchronization, otherwise your computers will be busy with disk synchronization only. But more about that later.

      I also don’t want to write a novel about the minimum configuration of hosts here, others have done that before me. I also realize that some users consider 10 Mb/s to be clearly too slow for their home network.

      I want to show that DRBD works even with absolutely minimal equipment. Which brings us back to cost savings, especially for small businesses.

      3 Preliminary considerations

      Before we take a closer look at the basic configuration of a two-node cluster, there are some basic considerations. If you have already made your selection or have special requirements, you can safely skip this chapter - but you do so at your own risk.

      I myself am not one for reading through endless introductions, and I know colleagues who read the introductions very carefully and then didn’t know what to do when it came time to implement them.

      The important thing for me in the preliminary considerations is to avoid unnecessary work, so that you don’t have any downtime at the end of a test run or even in a running, productive cluster.

      And nothing is more deadly to a cluster than not being available.

      That’s why the old do-it-yourself motto applies here, too:

      Measure first, then cut!

      3.1 Disk drive – physically vs. LVM

      So, let’s first take a look at how the disk drive should be "designed".

      Let’s first take a "physical disk device", i.e. an additional disk partition, in addition to the "classical" partitions like swap, root (/) and /home.

      This solution has the advantage that there is no additional "virtualization layer" holding up processing operations, which could lead to performance degradation in case of doubt.

      The disadvantage is that a subsequent increase or decrease in size, can only be carried out with increased effort if hardware actually has to be replaced.

      Using Logical Volume Manager, or LVM for short, gains more headroom, but adds a virtualization layer on very tight systems, which can lead to the aforementioned performance degradation.

      Both types of disks work with DRBD!

      In the systems I have set up, I generally use Logical Volume Manager because the advantage of adding disks after the fact outweighs the disadvantage of performance degradation.

      3.2 Filesystem on the disk device

      In principle, a DRBD could also be used as a RAW device. Whether and which file system "runs" on the DRBD device does not really matter. Nevertheless, I would like to take a closer look at the different working methods of the file systems used to help you decide. All file systems have their specific advantages and disadvantages based on the way they work. For perhaps understandable reasons, I won’t go into more detail about tree structures or the like at this point. If you are interested in these specific points, you should consult the relevant technical literature or www.wikipedia.com.

      3.2.1 UFS / ext2

      The good old ’UNIX File System’ - because that’s what UFS stands for - was developed in the early 1980s and was the standard file system for all UNIX derivatives until the early 1990s. Today, however, it is only used in isolated cases.

      However, the basic concept was passed on to the following file system generations:

       all data is stored in blocks on the hard drive and

       to get to a data block, the address of the memory block is stored in an area called "superblock", which is accessed first by the operating system.

      In this way a tree structure is obtained, because each stored file is assigned a specific "inode number".

      If a search is made for a specific file within the file system, the entire file tree must always be searched, which can take a comparatively long time for larger file trees with many substructures.

      The СКАЧАТЬ