Hi Guys
 
Happy new year!
 
I would like to have two volumes (say /dev/data and /dev/binlog) which are used 
by the same application to be synchronized from my primary node to the other 
node (bin logs and data dir of MySQL). In DRBD docs it says that resource is a 
replication group containing multiple volumes and “DRBD ensures write fidelity 
across all volumes in the resource.”. 
MySQL writes data to bin log and data log volumes and data dir contains 
snapshot while binlog contains dirty segments. There is a relation between the 
two - binlogs periodically merged back to data volume and purged, so to recover 
on the other side data volume must contain recent enough snapshot such that 
binlogs can be applied on top of it.
Following that I need two volumes to maintain write causality and be replicated 
strictly together – i.e. avoid situation when one volume lags or doesn’t 
replicate while the other one does, otherwise when I failover on the other side 
I will observe inconsistent picture. 

I put the following configuration to DRBD:

resource mysql_resource {
       startup {
               wfc-timeout     1;
        }
       disk {
               no-disk-flushes;
               no-md-flushes;
               fencing resource-and-stonith;
               on-io-error call-local-io-error;
               disk-timeout 0;
        }
       volume 0 {
               device    /dev/drbd1;
               disk      /dev/data;
               meta-disk internal;
        }
        volume 1 {
               device    /dev/drbd2;
               disk      /dev/binlog;
               meta-disk internal;
        }
 
        on ip-10-15-0-135 {
               address   10.15.0.135:1120;
        }
        on peer-host {
               address   10.15.1.61:1120;
        }
}
 
Now two questions:
Can I achieve such consistency guarantees by using DRBD resource with two 
volumes?
If yes and a resource is a single logical replication unit (in a sense of 
described guarantees), why are GIs different per volume? Can I have situations 
when only one volume is disconnected or needs to resync? Can I have situations 
when one volume is Priomary/Secondary while the other is Secondary/Primary?
More generally, what would be the motivation to have volumes grouped into 
resources if synchronization still happens on volume level? (Or maybe I am 
confused since documentation does refer to resources being unit of 
synchronization (like sync bitmask is per reaource), but get/set -gi accepts 
volume)
 
Anton Polyakov
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to