Several questions about enbd

Michael Ulitskiy <[email protected]>
Newsgroups gmane.linux.enbd.general
Organization AceDSL
Message-ID <[email protected]>
Hello,

I need a data mirroring solution for some high-available setups. 
I've made some research and found 2 packages that seem to be 
a viable option as they are in use and actively developed - ENBD and DRBD. 
So far I would favor ENBD over DRBD as it allows to have several mirrors
from one master data (one client RAID-1 - multiple servers). Also it seems
to me that using standard RAID driver is more promising and can potentially
allow to do very interesting things.
I'm still at the stage of studying, but there're a few questions that concerns
me:

1. are there any precautions taken to ensure that resyncs in networked RAID 
will be done from a node that has most up-to-date information? DRBD has a
well-defined algorithm to determine the source of up-to-date information 
described here http://www.drbd.org/fileadmin/drbd/publications/drbd_paper_for_NLUUG_2001.pdf
(meta-data section). What about ENBD? What will happen in worst-case 
scenario described in the paper (client crashes, enbd-server becomes primary 
and have modified data, then the whole cluster restarts.)? I can't imagine how
would raid1 know that it needs to resync from server to client unless ENBD
takes some special precautions. In other words whatever ENBD does is it
enough to reasonably guarantee data integrity?

2. this line of nbd-2.4.31/nbd/etc/ha.d/resource.d/enbd-primary scares the heck
out of me:
primaryside_client_start () {
    ...
   mkraid --really-force --dangerous-no-resync $MD
    ...
}
especially because man mkraid says: "Note that initializing RAID devices destroys  
all  of  the data on the consituent devices". Is it really necessary to recreate raid
superblock on each client start?

3. Is it possible to mount read-only and access data on the enbd-server? DRBD FAQ says
"most likely your filesystem will be confused because it will not be aware about 
changes in the underlying device". Is it also true for ENBD?

4. Because both local drive and nbd device are made into RAID-1 is there a way
to ensure that data reads will be done locally and not from the network.
AFAIK md driver will distribute reads over all device and having one of them
networked can have serious performance implications.

Sorry for such a long post and thanks in advance for all information you can provide.

Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.