[DRBD-user] DRBD sync rate way low

Lars Ellenberg Lars.Ellenberg at linbit.com
Mon Apr 12 14:08:55 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


> In case your version of DRBD does not yet support sync-groups,
> there is a "trick", by setting the min and max sync rate of all but one
> device to near zero, (like 0 and 1, or 1 and 2 K), and then as soon as
> one device finished sync, up them for one of the remaining devices...

Ah, just to make this clear:
While it is running, of course,
by "drbdsetup /dev/nbX syncer --min 0 --max 1"!
Otherwise Sync would just start over...

For example, something like the scriptlet below.

But again, the right thing to do would be to use sync groups,
then this is handled within the module.

	Lars Ellenberg

#!/bin/bash

suspend()  { drbdsetup /dev/nb$1 syncer --min 0 --max 1; }
resume()   { drbdsetup /dev/nb$1 syncer --min 2M --max 100M; }
waitsync() { drbdsetup /dev/nb$1 wait_sync; }

for i in `seq 1 10`; do suspend $i ; done

i=0; while true; do
  date
  echo "waiting for $i"
  waitsync $i && 
    echo "sync done for nb$i" ||
    echo "wait sync for $i failed"
  test $i == 10 && break
  let i++
  resume $i
done



More information about the drbd-user mailing list