[DRBD-user] New Idea - quick zeroing: good or bad?

Lars Ellenberg Lars.Ellenberg at linbit.com
Sun Apr 2 13:45:57 CEST 2006

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


/ 2006-03-31 21:22:01 +0400
\ Igor Yu. Zhbanov:
> Hello!
> 
> Performing initial sync on big volumes is a time-consuming operation.
> Is it possible to use a special value of generation counters to mark that
> certain block consists of only zero bytes? So when accessing to that block
> DRBD just return block of zeroes instead of real reading block from disk.
> And when someone writes anything to that block, it become an ordinary block.
> 
> So, by using spicial command initial sync (when using clean drives) will be
> instant.
> 
> The only price of this is that we losing ability to access lower device
> directly without DRBD. But accessing device directly is certainly bad idea. ;-)
> 
> What do you think?

You can fake initial meta data blocks which flag both devices as
"Consistent", and useing identical "Generation Counters".
If you know what you are doing, drbd then would initially come up as
"Connected Secondary/Secondary Consistent", without any initial sync.
You then promote one into "Primary", and "mkfs /dev/drbd0" a fresh file
system on top of that, which would already get replicated.

We have not made this easy, because there are people out there who would
use this "feature" without knowing what it actually does.

I give you the hint that you could use the "write_gc.pl" script in the
testing directory of the tarball to do this with a one-line command.

Cheers,

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
__
please use the "List-Reply" function of your email client.



More information about the drbd-user mailing list