Tag Archive for 'DRBD'

DRBD master/slave setup

In the last time I get a lot questions and feedback to some older posts (Active/Passive Cluster) where I used DRBD. And actually I never wrote how to setup DRBD and I try to fill this gap now. Also this post will be a new ground for some new ideas and posts related to Active/Passive Clustering with KVM.

DRBD (Distributed Replicated Block Device) is a really cool cluster solution to have radundant data on two or more nodes. Everybody know RAID, DRBD is like RAID 1 over network.
Continue reading ‘DRBD master/slave setup’

DRBD set sync speed

The default sync rate is normally defined in your drbd configuration (mostly /etc/drbd.conf)

1
2
3
syncer {
    rate 100M; 
}

If you are setting up a virtual machine on drbd cluster you need to produce more I/O and your physical machines are under heavy load. You can stop some services or you can reduce the sync rate.

Set temporary sync rate:
You need to issue this command only on one of your nodes!

1
root@drbd-node1:~# drbdsetup /dev/drbd0 syncer -r 10M

Enjoy the easy solution;)

Active/Passive Cluster with Pacemaker, Corosync

In this article I will explains how to set up and maintain an Active/Passive Cluster, using Pacemaker with Corosync with DRBD replication.

We have two nodes (same hardware), one active and another in passive mode. If the active node goes down, the passive one will automatically take its position and all running services.

This article was written complete for and with Debian 6-squeeze (With a lot of luck you could bring it to run on Ubuntu)

Active/Passive

1. Basic notes

Node-1:
Hostname: node-1
IP: 192.168.2.101

Node-2:
Hostname: node-2
IP: 192.168.2.102

Partitioning:

/dev/vda1 System / ext4
/dev/vda5 reserved for DRBD – empty
/dev/vda6 swap area

Cluster IP: 192.168.2.100
We need this cluster IP to reach currently active node.

This is a physical network structure of the cluster:
Structure
Continue reading ‘Active/Passive Cluster with Pacemaker, Corosync’