DRBD-like something for FreeBSD

Anton Nikiforov anton at nikiforov.ru
Wed Aug 3 18:43:53 GMT 2005

Eric Anderson wrote:

> Anton Nikiforov wrote:
>> Dear ALL,
>> I'm running a few clusters with Linux, but do not like it ;) and would 
>> like to move to FreeBSD.
>> I know about vrrpd and pfsync and other solutions, i know how to run 
>> Oracle or Postfix or PostgreSQL under such a configuration. but the 
>> only thing i cannot find is something like DRBD device that is working 
>> pretty cool and stable under linux (it is mirroring raw partitions 
>> from one node to other/s).
>> Could someone please direct me to the link or list where i can read 
>> something about?
> GEOM Gate and GEOM mirror are probably what you want.  Check out ggated, 
> ggatec and geom_mirror.
> Eric
Thanks for the replay, Eric,
Please correct if i'm wrong. You suggest to make two devices one is 
local daX device and the other is ggated/gagatec device and build a 
mirror set on them using geom_mirror module and gmirror utility?
That is pretty cool idea, but what i should do in case main (ggated) 
system crash?  I'm still reading and investigating this issue, and will 
test it as soon as i'll get to PCs/Servers to test, but as for now i do 
not see the way to promote second node as prymary in case of real 
prymary crashed. Or i should test it with vrrpd (for example) and 
restart secondary as ggated instead of being ggatec? Did not clear yet. 
If you have the solution or an idea - could you please drop me a line?

algorythm looks the following for me:
We have two computers:
stage 0 (up and running claster)
1. da0 is exported via ggated over the network.
This computer runing postgresql (for example) that storing data on da0.
2. da1 is being imported over network via ggatec as da1. Local da0 and 
remote da1 are mirrored via ggated/geom_mirror.ko
and there is no service activity on this device. just a mirroring of data.

stage 1 (slave failed)
1. working as before
2. down
Requests to update remote data failed. There should be no problem.

stage 2 (slave is coming up)
1. working as before
2. booting and starting to mirror date from the master
in case secondary goes down and up again there are no troubles. it just 
boots itself in the stage0 config. that is it

stage 3 (master is down)
1. down
2. should consider master is down and stop ggatec, then start ggated and 
export the da0. Then mount da0 and start PostgreSQL.

stage 4 (master coming up)
1. Should understand it is not the master anymore and start ggatec and 
mirror remote data to the local drive.
2. running as a master. with services moved/started at stage 3
Here troubles begins. When bouth become synchronized the service that 
was running on this disk shoul be moved from 2 to 1. to do that i'll 
have to restart services in stage 0. But how? using vrrpd? or some other 
utility? How can i understand that the system is ready to get the 
Postgresql back to 1 and stop it on 2?

stage 5 (bouth down, master coming up first)
1. Starting as master, exactly as it did before stage 0
2. Starting as in stage 1

stage 6 (bouth down, slave is coming up first)
1. Have to determine which was doun first and in case 1 was - start as 
the slave and vise versa - in case it was down last - should start as 
2. Have to determine which was doun first and in case 2 was - start as 
the slave and vise versa - in case it was down last - should start as 
This is main confuse. Maybe i did not read mutch, but it is not clear 
for me, how to inderstand which drive contain the last data?

Best regards,
Anton Nikiforov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2218 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-cluster/attachments/20050803/0b82d06e/smime.bin

More information about the freebsd-cluster mailing list