[DRBD-user] how to measure the time of one file's synchronization to secondary node

Mike Lovell mike at dev-zero.net
Tue Sep 21 17:30:06 CEST 2010

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


Tomki wrote:
> resource r0 {
>  protocol C;
>  startup { wfc-timeout 0; degr-wfc-timeout 120; }
>  disk { on-io-error detach; }
> }
>
> If I copy a 1GB file to /mnt on primary node , how to measure the time
> of this file's synchronization to secondary node
> done completely.
according to the config you posted, you are using protocol C on the drbd 
resource. the drbd.conf man pages says that with protocol C the "write 
IO is reported as completed, if it has reached both local and remote 
disk." in other words, when you write a file on the primary, drbd will 
not return the write operation as completed until drbd has written the 
blocks to the local disk as well as written it to the disk on the remote 
node. this makes it really easy to measure the time that it takes. just 
do `time cp /path/to/large/file /mnt/new/path/to/large/file`. the write 
operations in the cp wont complete until the data is on both disks.

mike




More information about the drbd-user mailing list