[DRBD-user] Strange replication using DRBD 8.3.2

loopx laurent.henssen at gmail.com
Wed Apr 14 13:46:38 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.


Hello,


I'm running RHEL 5.5 on two workstation for test DRBD and I get something
that sound strange ...

------------
http://www.drbd.org/docs/introduction/ :
    Protocol C. Synchronous replication protocol. Local write operations on
the primary node are considered completed only after both the local and the
remote disk write have been confirmed. As a result, loss of a single node is
guaranteed not to lead to any data loss. Data loss is, of course, inevitable
even with this replication protocol if both nodes (or their storage
subsystems) are irreversibly destroyed at the same time. By far, the most
commonly used replication protocol in DRBD setups is protocol C.
-------------

But, when using 8.3.2 (on both side), and copy a 10Gb (9.6 in fact) file
from LOCAL (/) to DRBD0 (mounted under /mnt/), I see that the local copy is
finished, but the network transfert is not yet finished and didn't receive
the complete file (see the amount of date received by using "iftop") ...



See the result of one test :
-------------
[0][root at wk01lhe /]$ time cp 10go-random.file /mnt/
real    14m11.318s
user    0m1.236s
sys     0m49.915s
--------------

After 14min11, the network still in use for about 1min15 ...

I've made another test :
---------
lin1 <= lin2 (lin2 is primary ; lin1 is secondary)
---------

* start the copy (from lin2 local to lin2 drbd)
* after 14min, when the "cp" command say the copy is finished (from lin2 ;
return to the shell), I unplug the network cable and break the connexion
* then, set lin1 as primary and mount the filesystem
* check the size of the file (which should be the same size because of the
use of protocol C and unplug after the "cp" command has successfully
finished)

I see than the file is missing about 800Mb of data (8.8 and not 9.6Gb)! I
don't understand what happening with the C protocol ...


Please note that I'm not using a physical partition ... but a loop device
... I know about the risk : this is just for test and I don't think it will
impact the network transfert ...

---------
/home/laurent/kvm/qemu-kvm_hdd => /dev/loop0 => /dev/drbd0
---------
(same on both side)


Any idea ? I've read the "drbd.conf" but have not found any interesting
parameter ... The behavior of the C protocol in DRBD 8.3.2 is really
strange, isn't ?



Here is the configuration used :
------------
[laurent at wk02lhe kvm]$ cat /etc/drbd.conf
# last update by loopx on 20100413 :
#       - update the configuration to be easier with version 8.3
#       - creation of this config for 8.0
#################################################################

global {
        #don't send statistics through internet ...
        usage-count no;
}
common {
        protocol C;
}
resource r0 {
        device          /dev/drbd0;
        disk            /dev/loop0;
        meta-disk       internal;

        syncer {
                rate 10M;
        }

        on wk02lhe.hbac.onerva.fgov.be {
                address         <ip1>:7789;
        }
        on wk01lhe.hbac.onerva.fgov.be {
                address         <ip2>:7789;
        }
}
-------------

Before version 8.3.2, I've try the 8.0 and I don't see this strange behavior
..


Note: the file used to test DRBD is a simple generated file with "dd" and
"/dev/urandom" ...
Note2: before post here, I've post here : 
-- 
View this message in context: http://old.nabble.com/Strange-replication-using-DRBD-8.3.2-tp28241563p28241563.html
Sent from the DRBD - User mailing list archive at Nabble.com.




More information about the drbd-user mailing list