Post by account_disabled on Feb 22, 2024 7:23:04 GMT
As I mentioned in the first part of the series of articles about DRBD, in the second article I will explain some of the most basic configurations required to put it into operation, as well as the main operating modes it can provide us. As I mentioned before, configuration can currently be done in a graphical environment, although for the most purists who want absolute control over all possible configurations, the option will undoubtedly be done via a text file with the desired configuration. Here I show the most basic example of the file and the minimum data we need (in this example, 2 volumes will be copied to ensure that the configuration remains simple regardless of the number of devices being copied). Tabla As we can see, we have created a "resource" called "r0".
In this resource, we create a "volume" to replicate its data, as well as the IP address and port to use to perform the replication. We can create Switzerland Mobile Number List volumes as independent resources. The advantage of the second way is that we can stop the synchronization of resource "r0" and continue the replication of resource "r1", for example, if we configure them the way in the example, if we stop the resource "r0" the replication of both volumes will stop .
This configuration is at the discretion of the system administrator and can be done in a way that suits him/her best. As I already mentioned, you can have all the "resources" you need in the same configuration file, although you can stop or start the ones you want later. In "Device" we specify the name to give the new device, we can name it whatever we think is appropriate and then identify it correctly. This means that if we call it "drbd1" like in the example, a new entry with that name will appear in the "dev" directory and from then on, to access the partition we will no longer go through / dev/ accesses it as sda7, but through /dev/drbd1 (this works for all purposes, that is, any application on our system that has to access sda7 will no longer be able to do so, the partition can be accessed through the new name drbd1.
The partition can still be accessed by any software as if it were the original partition. Using the "disk" parameter we specify the "real" partition, disk, LVM. to be copied using the name "drbd1". In "metadisk" we specify where the metadata is stored, and it's almost always "internal", as I mentioned before. We just need to specify on both nodes ("bob" and "alice" in our case) which IP (since it can and must have multiple network cards) and port to sync over.
For ports, we can also use any one, as long as it has not been used by another application before. It must be taken into account that if we split the volumes into different resources, we can also use a port for each volume, thus separating the replication traffic through different ports. As we can see, nodes are identified by name and not by IP, so it is important to ensure beforehand that this is possible (accessing from one node to another by name) by adding an entry to the "hosts" file Or through DNS. Just by this simple configuration and starting the DRBD service, we can replicate the disk in real time.
In this resource, we create a "volume" to replicate its data, as well as the IP address and port to use to perform the replication. We can create Switzerland Mobile Number List volumes as independent resources. The advantage of the second way is that we can stop the synchronization of resource "r0" and continue the replication of resource "r1", for example, if we configure them the way in the example, if we stop the resource "r0" the replication of both volumes will stop .
This configuration is at the discretion of the system administrator and can be done in a way that suits him/her best. As I already mentioned, you can have all the "resources" you need in the same configuration file, although you can stop or start the ones you want later. In "Device" we specify the name to give the new device, we can name it whatever we think is appropriate and then identify it correctly. This means that if we call it "drbd1" like in the example, a new entry with that name will appear in the "dev" directory and from then on, to access the partition we will no longer go through / dev/ accesses it as sda7, but through /dev/drbd1 (this works for all purposes, that is, any application on our system that has to access sda7 will no longer be able to do so, the partition can be accessed through the new name drbd1.
The partition can still be accessed by any software as if it were the original partition. Using the "disk" parameter we specify the "real" partition, disk, LVM. to be copied using the name "drbd1". In "metadisk" we specify where the metadata is stored, and it's almost always "internal", as I mentioned before. We just need to specify on both nodes ("bob" and "alice" in our case) which IP (since it can and must have multiple network cards) and port to sync over.
For ports, we can also use any one, as long as it has not been used by another application before. It must be taken into account that if we split the volumes into different resources, we can also use a port for each volume, thus separating the replication traffic through different ports. As we can see, nodes are identified by name and not by IP, so it is important to ensure beforehand that this is possible (accessing from one node to another by name) by adding an entry to the "hosts" file Or through DNS. Just by this simple configuration and starting the DRBD service, we can replicate the disk in real time.