4.9. Rebalancing data with DRBD Manage

Rebalancing data means moving some assignments around, to make better use of the available resources. We’ll discuss the same example as for the manual workflow.

Given is an example policy that data needs to be available on 3 nodes, so you need at least 3 servers for your setup.

Now, as your storage demands grow, you will encounter the need for additional servers. Rather than having to buy 3 more servers at the same time, you can rebalance your data across a single additional node.

Figure 4.3. DRBD data rebalancing

rebalance

First, you need to add the new machine to the cluster; see Section 4.2, “Adding nodes to your cluster” for the commands.

The next step is to add the assignment:

# drbdmanage assign <resource> <new-node>

Now you need to wait for the (initial) sync to finish; you can eg. use the command drbdadm status with (optionally) the resource name.

One of the nodes that still has the data will show a status like

    replication:SyncSource peer-disk:Inconsistent done:5.34

while the target node will have a state of SyncTarget.

When the target assignment reaches a state of UpToDate, you have a full additional copy of your data on this node; now it is safe to remove the assignment from another node:

# drbdmanage unassign <resource> <old-node>

And voilà - you moved one assignment, in two[4] easy steps!



[4] Or three, if you count waiting for the UpToDate state.