Disk Replication with DRBD: Difference between revisions
Dubiousjim (talk | contribs) (Category:Storage) |
|||
Line 27: | Line 27: | ||
It is recommended to have a dedicated heartbeat interface for DRBD where replication occurs. | It is recommended to have a dedicated heartbeat interface for DRBD where replication occurs. | ||
Create DRBD device and bring it up on '''both nodes''': | Create the DRBD device and bring it up on '''both nodes''': | ||
#drbdadm create-md r0 | #drbdadm create-md r0 | ||
Line 36: | Line 36: | ||
#drbdadm -- --overwrite-data-of-peer primary r0 | #drbdadm -- --overwrite-data-of-peer primary r0 | ||
If you want to temporarily speed up replication run (e.g. 1G): | If you want to temporarily speed up replication, run (e.g. 1G): | ||
#drbdsetup /dev/drbd1 syncer -r 1G | #drbdsetup /dev/drbd1 syncer -r 1G |
Revision as of 04:44, 5 July 2021
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
Disk Replication with DRBD
DRBD support is present only in SCST version of Alpine. At the time of this writing DRBD tools are currently in edge (testing).
#apk add drbd
Load DRBD kernel driver:
#modprobe drbd
Sample DRBD configuration in /etc/drbd.d/r0.res (resource 0):
resource r0 { device /dev/drbd1; disk /dev/md0; meta-disk internal; on host1 { address 192.168.0.1:7789; } on host2 { address 192.168.0.2:7789; } }
It is recommended to have a dedicated heartbeat interface for DRBD where replication occurs.
Create the DRBD device and bring it up on both nodes:
#drbdadm create-md r0 #drbdadm up r0
On primary node start replication:
#drbdadm -- --overwrite-data-of-peer primary r0
If you want to temporarily speed up replication, run (e.g. 1G):
#drbdsetup /dev/drbd1 syncer -r 1G
Control replication status:
#cat /proc/drbd