[DRBD-user] Sync to the same IP

Bram Klein Gunnewiek bram at shockmedia.nl
Thu Jun 19 10:53:44 CEST 2014

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


No idea about the performance or why you want to use this set-up, but a 
simple test shows that it does work:

# Test on same host
lvcreate -n drbd_one_data -L 1GiB vg1
lvcreate -n drbd_one_meta -L 128M vg1

lvcreate -n drbd_two_data -L 1GiB vg1
lvcreate -n drbd_two_meta -L 128M vg1

# Create resources
drbdsetup new-resource one
drbdsetup new-resource two

# Init metadata
drbdmeta --force /dev/drbd0 v08 /dev/vg1/drbd_one_meta 0 create-md
drbdmeta --force /dev/drbd0 v08 /dev/vg1/drbd_one_meta 0 apply-al

drbdmeta --force /dev/drbd1 v08 /dev/vg1/drbd_two_meta 0 create-md
drbdmeta --force /dev/drbd1 v08 /dev/vg1/drbd_two_meta 0 apply-al

# Minor numbers
drbdsetup new-minor one /dev/drbd0 0
drbdsetup new-minor two /dev/drbd1 0

# Attach disks
drbdsetup attach /dev/drbd0 /dev/vg1/drbd_one_data /dev/vg1/drbd_one_meta 0
drbdsetup attach /dev/drbd1 /dev/vg1/drbd_two_data /dev/vg1/drbd_two_meta 0

# Set-up connections
drbdsetup connect one localhost:5000 localhost:5001 --verify-alg sha1
drbdsetup connect two localhost:5001 localhost:5000 --verify-alg sha1

# Make one primary
drbdsetup primary /dev/drbd0 --force

cat /proc/drbd:

version: 8.4.3 (api:1/proto:86-101)
srcversion: F97798065516C94BE0F27DC
  0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
     ns:1048576 nr:0 dw:0 dr:1049312 al:0 bm:64 lo:0 pe:0 ua:0 ap:0 ep:1 
wo:f oos:0
  1: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
     ns:0 nr:1048576 dw:1048576 dr:0 al:0 bm:64 lo:0 pe:0 ua:0 ap:0 ep:1 
wo:f oos:0

On 06/19/2014 10:34 AM, Csanad Novak wrote:
> Alexey,
>
> Unfortunately you won't get answer for this question, no matter how 
> hard you are trying. Let me guess: you'd like it because Amazon EC2? 
> I've read trough the documentation, asked this question on various 
> forums, including the company engineers, but the usual answer is:
>
> -  Hey, that would be RAID.
>
> An other standard answer is goes like Bret's answer: why would you 
> want this. But even after you are telling why you would want it, there 
> will be no solid answer at all.
>
> So my solution is:
>
> Create a network interface alias with an other IP address and you can 
> sync the two block device on the same host.
>
> Cheers
> -- 
> Csanad Novak
> Sent with Airmail
>
> On 19 June 2014 at 8:24:42 pm, Bret Mette (bret.mette at dbihosting.com 
> <mailto:bret.mette at dbihosting.com>) wrote:
>
>> I am curious why you would want to use DRBD for that task? Isn't that 
>> a little overkill? There are other means to do that which certainly 
>> have less overhead and are easier to configure.
>>
>>
>> - Bret
>>
>>
>> On Wed, Jun 18, 2014 at 4:23 PM, Alexey Orishko 
>> <alexey.orishko at gmail.com <mailto:alexey.orishko at gmail.com>> wrote:
>>
>>     Hi all,
>>
>>     I got recently across DRBD and it looks like a cool stuff.
>>     I wonder if someone could clarify for me if it is possible to
>>     configure DRBD to sync one block device to another block device
>>     on the
>>     same host?
>>
>>     Regards,
>>     Alexey
>>     _______________________________________________
>>     drbd-user mailing list
>>     drbd-user at lists.linbit.com <mailto:drbd-user at lists.linbit.com>
>>     http://lists.linbit.com/mailman/listinfo/drbd-user
>>
>>
>> _______________________________________________
>> drbd-user mailing list
>> drbd-user at lists.linbit.com
>> http://lists.linbit.com/mailman/listinfo/drbd-user
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140619/f0c573f2/attachment.htm>


More information about the drbd-user mailing list