[DRBD-user] do I really need heartbeat for DRBD?

Tomasz Chmielewski mangoo at wpkg.org
Mon Dec 17 15:33:55 CET 2007


Mark Watts schrieb:
>> I just want to replicate a SAN (array, disk etc.) to another physical
>> location.
>> There is no sense in using heartbeat for me, as when that primary SAN
>> dies, the asymmetric link from another datacenter will be too slow
>> anyway to provide services.
> 
> Why not use rsync or some other replication that runs on a periodic basis?
> It actually sounds like DRBD is overkill here.

rsync does not work for block devices.
All other similar tools will certainly give unpredictable results if it 
copies a file (or block device) to which someone still appends data.

Another alternatives I considered:

1. RAID-1 over iSCSI - can be problematic when network connection is 
dropped or there are disconnections

2. distributed storage / dst - doesn't seem ready yet


So it seems to me that drdb is the best choice?


>> So, if I want to replicate a local array to another machine, should I
>> use 127.0.0.1 address in drbd.conf?
> 
> No - use the real network address of the node. (Connections to that IP from 
> the local box will be dealt with internally by Linux anyway - data will never 
> hit the network hardware).
> 
>> resource drbd0 {
>>    protocol C;
>>    incon-degr-cmd "halt -f";
>>
>>    on thost1 {
>>      device    /dev/nb1;
>>      disk      /dev/hda7;
>>      address   127.0.0.1:7789;
>>    }
>>
>>    on thost2 {
>>      device    /dev/nb1;
>>      disk      /dev/hda7;
>>      address   10.1.1.32:7789;
>>    }
>> }
>>
> 
> 
>> And what happens if your heartbeat box dies? ;)
> 
> Heartbeat runs on both nodes and they send monitoring packets (heartbeats) to 
> each other on a very frequent basis. Should one node die, the other will take 
> over. [ "die" is defined when the Secondary node can no-longer communicate to 
> the Primary node in any way. If you only have one network link between the 
> nodes, and that dies your cluster will go split-brain unless you have some 
> form of out-of-band fencing system in place. ]

Hmm, maybe indeed I'll consider heartbeat. Sounds like there are only 
wins here, with a minor one-time configuration effort.



-- 
Tomasz Chmielewski
http://wpkg.org



More information about the drbd-user mailing list