ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
    • UKFast Backup
    • Backup Techniques
    • General backup guidance
    • FASTcloudbackup
    • Business Continuity Platform
      • Introduction to BCP
      • Managing your cluster
      • Distributed Replicated Block Device (DRBD)
      • Unison file-level replication
      • Fencing / STONITH
      • Installing, updating, and configuring software
      • Split brain
      • Frequently asked questions
    • Classic Load Balancers
    • Load Balancers
    • Disaster Recovery as a Service
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
  • Webcelerator
  • MyUKFast
  • Home >
  • Backup and High Availability >
  • Business Continuity Platform >
  • Distributed Replicated Block Device (DRBD)

Distributed Replicated Block Device (DRBD)¶

DRBD is utilised in our physical Business Continuity Platform (BCP) solutions to replicate data at block level between two or more servers. While not wholly comparable, you could think of it as resembling RAID1 being performed over the network on two volumes.

Generally, there are two DRBD volumes in each cluster:

  • /dev/drbd0 mounted as /var/www/vhosts

  • /dev/drbd1 mounted as /var/lib/mysql

We connect DRBD to 10Gbps ports wherever possible, and otherwise make use of direct 10Gbps crossover cables to facilitate real-time replication between the member nodes. You’ll see this listed as p1p1 or p1p2 when looking at the NICs connected to your server.

DRBD is active / passive by nature, so only one node can be “primary” for the volume at a time - and therefore only one node can have the volume mounted at a time. If more than one node considers itself “primary”, the cluster has likely become split brain.

Given the above, don’t be alarmed if /var/www/vhosts or /var/lib/mysql looks to be “missing” from one of your nodes, it is probably mounted elsewhere in the cluster.

Viewing DRBD replication status¶

To confirm that DRBD is synchronised, or that the node you’re logged into is “secondary”, you can run cat /proc/drbd:

[root@acme-webdb-01 ~]# cat /proc/drbd
version: 8.4.9-1 (api:1/proto:86-101)
GIT-hash: 9976da086367a2476503ef7f6b13d4567327a280 build by akemi@Build64R7, 2016-12-04 01:08:48
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
    ns:22341096 nr:4576 dw:22345672 dr:41373565 al:1464 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
 1: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
    ns:15052 nr:37890252 dw:37905304 dr:40297 al:14 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
[root@acme-webdb-01 ~]#

In this output the 0: item denotes the DRBD device number, and Primary/Secondary shows the local node status first, then the remote node status. The UpToDate/UpToDate element follows the same format, and shows that DRBD is synchronised.

If these show WFConnection, Primary/Unknown, or StandAlone/Unknown, please contact support immediately.

Next Article > Unison file-level replication

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ