DRBD Introduction

DRBD full name: Distributed Replicated Block Device (DRBD) distributed block device replication, DRBD kernel module is configured and associated scripts to build high availability cluster. This is achieved is to mirror the entire apparatus through a network. It allows users to establish real-time mirroring a local block device on the remote machine. Combination connected to the heartbeat, it may be seen as a network RAID. DRBD is responsible for receiving data, the data is written to the local disk, and then sent to another host. Another host data and then saved to your disk. Currently, DRBD allows only read and write access to a node, which switched high-availability cluster terms have been sufficient for a normal fault. Future versions will support two read-write access nodes. DRBD a system composed of two or more nodes, similar to HA cluster, there are sub-master and standby nodes, the node with the main device, applications and operating systems can run and access DRBD device. In the master node writes the data storage device to the disk device by drbd master node, while the data is automatically sent to the corresponding device drbd standby node, the standby node finally written in the disk device, on the standby node, drbd simply writes data to the disk device from the standby device drbd node. Most of the existing high-availability cluster will use shared memory, and DRBD can be used as a shared storage device, using DRBD does not require any hardware investment. Because it runs on an IP network, therefore, the use of DRBD as a shared storage device, to save a lot of costs, because more in price than a dedicated IP network storage network economy. DRBD is a distributed storage system of the storage layer in the linux kernel, using the available shared DRBD linux block device between two servers, and shared file system data. RAID1 function similar to a network, as shown: Before you create a file system on the DRBD device, you must first set the DRBD device. Only through the / dev / drbd apparatus (not an original equipment) manipulation of the user data, as original equipment DRBD last metadata store 128 MB. Be sure to create only the file system on / dev / drbd equipment, not on the raw device. For example, if the original device size is 1024 MB, the apparatus has only 896 MB available DRBD for data, 128 MB hidden and reserved for metadata. The space between 896 MB and 1024 MB access any attempt will fail, because it is not available for user data. DRBD device on the host to mount a directory for use. Preparation machine DRBD device is not mounted, because it is used to receive host data from DRBD responsible for the operation.

Reproduced in: https: //my.oschina.net/766/blog/210952

Guess you like

Origin blog.csdn.net/weixin_33871366/article/details/91548092