[olug] DRBD - Multiple Partitions / Devices

Abigail Edwards abby at sekluded.org
Tue Sep 8 00:42:28 UTC 2009


On 09/03/2009 10:22 AM, Curtis LaMasters wrote:
> Does anyone know how to replicate multiple devices with DRBD?
>
>    
[..snip..]
> Do I leave the :PORT the same or does that need to change per DRBD device?
>
>    
The port needs to be unique per resource, but the same for both peers.  
Here's an example of a known-working configuration used with Xen for 
live migration:

resource r<unique resource name>  {
   net {
     allow-two-primaries;
   }
   disk {
     on-io-error detach;
   }
   on xen01 {
     device      /dev/drbd<unique drbd device number>;
     disk        /dev/vg1/drbd.<guest name>.xvda;
     meta-disk   internal;
     address     10.0.0.1:<unique port number>;
   }
   on xen02 {
     device      /dev/drbd<same drbd device number as above>;
     disk        /dev/vg1/drbd.<guest name>.xvda;
     meta-disk   internal;
     address     10.0.0.2:<same port number as above>;
   }
}


That goes into /etc/drbd.conf on both nodes; I would edit on one and 
copy to the other node when finished to make sure they're in sync.
> Curtis LaMasters
> http://www.curtis-lamasters.com
> http://www.builtnetworks.com
>    

--
Abby Edwards



More information about the OLUG mailing list