[ENBD] Load sharing with enbd?

Daniel Steen dsteen at capalon.com
Thu Feb 23 10:05:46 MST 2006


Sorry.  Let me try and be more clear.  We have two web servers which we
do load sharing across using simple dns round robin.  Currently they
basically run independently of each other and are kept in sync through a
combination of (very nasty) rsync scripts.  This is done more or less
"live", but is not as reliable or as robust as we would like. 

Would this sort of setup be possible using enbd?  Could we have each
machine be half of a raid device, and then have BOTH machines write to
that raid device?  If so how would we set it up so that the raid device
exists on both machines?


Peter T. Breuer wrote:

>"Also sprach Daniel Steen:"
>  
>
>>I'm looking into using enbd to keep two disks in sync (using enbd and
>>fr1) both of which need to be able to be written to.
>>How would this be done?
>>    
>>
>
>Well, assuming these are on different machines, the canonical
>architecture would be to have the raid on a third front end machine
>(which could be one of the existing two - or both, with failover) and
>using enbd to allow the raid components to be (possibly) remote.
>
>  
>
>>Would it be neccesary to export a disk from
>>machineA, and incorperate it in a raid array on machineB, and then
>>export the raid disk (md0 or whatever) back to machineA? 
>>    
>>
>
>Well, I don't know why you would want to export it again ..  what was
>wrong with keeping md0 on machineB?
>  
>
If we only had md0 on machineB we would not be able to access it via
machineA, so changes made on machineA would not be seen on machineB (and
would likely mess up the raid).

>  
>
>>This does not
>>seem like a very efficient solution.  Does anyone have a better method
>>(or is enbd the wrong tool for this, and if so, what would be the
>>correct one?)  My understanding is that it is not possible to simply
>>export the base device from each machine, and incorperate that in a raid
>>array on the other machine as we would get confused data due to disk
>>caching.  Is this the case?  Would this be solved by mounting all
>>devices (including the md devices) in "sync" mode?
>>    
>>
>
>It's not totally clear what you want to do. "keeping two disks in sync"
>has many interpretations (including "keep both in a cupboard"). I get
>the impression that you want to write to EITHER disk individually, and
>have the changes magically appear on the other. That's not really
>possible as stated (an old driver of mine called "yoke" did that).
>Instead one usually agrees to write instead to a third device called
>"md0" which transmits changes equally to both disks, but one doesn't
>write directly to the disks.
>  
>
I don't mind not writing directly to the disk, as long as I can write
from EITHER machine, and have it appear on both disks.


Thanks,

-Dan


More information about the ENBD mailing list