[DRBD-user] Questions regarding the initial syncing of a drbd partition

Lars Ellenberg lars.ellenberg at linbit.com
Fri Sep 11 15:09:21 CEST 2015

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


On Thu, Sep 10, 2015 at 02:21:02PM +0200, Joerg May wrote:
> Hi,
> 
> I have some questions regarding the initial syncing of a drbd partition,
> where I could not find answers for in the drbd documentation.
> 
> Let's assume the following case:
> Two computers have their own hard disks, each of them has a
> partition which is synced via drbd
> with the other computer's hard disk partition.
> Let's say this partition is only used to one third, so two thirds of
> it are still free.
> Now on one machine the hard disk has a physical problem and is
> replaced by a fresh one.
> Of course now for the fresh hard disk an initial syncing needs to be done.
> 
> Now my questions:
> - How efficient is the initial syncing ?
>   Will only the used blocks be synced or the complete partition (so
> also the unused, free blocks) ?

DRBD is agnostic to "usage", so it has no knowledge of "free".

>   Would it be useful to delete unnecessary files before the initial
> syncing to reduce the syncing time ?

No.

> - Are there any means (e.g. drbd configuration options) to shorten
> the initial syncing time ?

Not really.

>   Would e.g. checksum-based syncing help to identify faster the free
> blocks and skip them for syncing ?

No.

You may consider "truck based replication" (see the User's Guide).

Or you can (if your backend supports "discards" resp. "trim")
run an "fstrim -v" against the DRBD mount point on the SyncSource
while the resync is running, that should usually speed it up
(because it won't read data -> transfer data -> write data,
but simply send "discard this LBAs" and then do so...)

-- 
: Lars Ellenberg
: http://www.LINBIT.com | Your Way to High Availability
: DRBD, Linux-HA  and  Pacemaker support and consulting

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list