This post explains you about the DRBD (Distributed Replicated Block Device) to understand What is DRBD (Distributed Replicated Block. Distributed Replicated Block Device (DRBD) mirrors block devices between multiple hosts. The replication is transparent to other applications on the host. This step-by-step tutorial demonstrates how to install Distributed Replicated Block Device (DRBD) on CentOS Linux.

Author: Faell Bragrel
Country: Moldova, Republic of
Language: English (Spanish)
Genre: Business
Published (Last): 23 February 2013
Pages: 168
PDF File Size: 1.3 Mb
ePub File Size: 15.2 Mb
ISBN: 470-5-81057-158-2
Downloads: 58304
Price: Free* [*Free Regsitration Required]
Uploader: Sazuru

This can be disabled by setting usage-count no. Apart from computer stuffs, I like to travel and feel like traveling is one of the ways to seek myself. For this tutorial, I am using CentOS 6. After logging in you can close it and return to drbc page. Start Your Free Trial Now.

What is DRBD, How DRBD works – DRBD Tutorial for Beginners

After logical device made usable, attach the drbd0 device to sdb1 disk on both nodes. Below are the steps: Below are some basic test scenarios you can simulate pretty easily. Then boot drbd01 again and enjoy the split-brain scenario!

GPG-key is the public key used to encrypt the communication between nodes. An example is posted below: You can check the status by:.

HowTos/Ha-Drbd – CentOS Wiki

To see what happens when the secondary server goes offline: After executing the above command, the data will start syncing with the secondary host. This will provide the DKMS-based kernel module and userspace hosto.

After this, we will set node1 as secondary and node2 as primary. Notice in above that the DRBD service did start not yet. Get your subscription here.


DRBD can be understood as a high availability for hardware and can be viewed as a replacement of network shared storages. On both servers, setup: The partition size is not particularly relevant, but both partitions need to be the same size.

You can’t mount resource in node1. Primary node — drbd It’s necessary that the server you’d like to install DRBD on has a free block-device.

Setting Up Network RAID1 With DRBD On Debian Squeeze

After drbd has been setup at both the nodes and one node is made primary. Prepare the Debian system The module portion of DRBD is shipped with Debian kernels, but the user space tools and configuration files ship with the drbd8-utils package.

Any block device hard disks, partitions, RAID devices, logical volumes, etc can be mirrored. More information can be found at http: Testing secondary node failure To see what happens when the secondary server goes offline: We must identify the drbd versions supported by our kernel. You can check the status by: And then mount the drbd0 device to your system and you are allowed to perform actions on the device.

Amigo en el paso 3 al momento de querer actualizar los modulos me indica este error: Store sample data Let’s create a filesystem on that block device and put some data on it. This can be done only on one of the nodes. Before we start, we need to update the system and install the required packages for the DRBD dependencies.


You need to reboot the system and try:. Now create a file to test the synchronization of drbd nodes.

How to setup DRBD

Those systems are defined as Primary howti and Secondary node can switch Primary and Secndary nodes. I didn’t find a proper way how to setup loop back files during the boot process maybe via udev rules?

Demote the primary server to the secondary role:. The example end result will show how to create files or folders inside a partition on Server A and successfully show all the content on another server Server B using DRBD. To get started using drbdfirst install the necessary packages. You can check the status with:.

Now we’ve coming to final step which is the configuration of DRBD. Promote drbd02 to become primary Unmount the partition and demote the current primary drbd01 to secondary: DrBd last modified If any queries remains, you can comment out below at comment section.

The following example has nothing more than “Hello World” character. Partners Support Community Ubuntu. Once the dependency package installation has finished on both servers, we will start to install the DRBD packages. That’s all, now we will create a new disk partition to act as DRDB disk.

Once you’ve successfully mounted the DRBD partition to your new folder, you’ll notice that the file that you’ve created in server OEL before automatically existed!