FreeBSD HA file cluster possibilities
Rick van der Zwet
rvdzwet at transip.nl
Tue Jul 14 11:55:20 UTC 2009
RIck van der Zwet wrote:
> I been (re)searching and reading what the options are with regards to
> H(igh) A(vailablility) file storage using FreeBSD, but cannot yet find a
> proper working solution. Any advice welcome!
> I like to be able to mirror a full identical disk between two server. So
> in case of hardware failure of server A (Master). Server B (Slave)
> immediately takes over, without any loss of data. The Network
> configuration is easy using ucarp/vppr. But the file system is the hard
> part. Paths I have investigated:
> a) ggate & gmirror: Export system on Server B to Server A. Use gmirror
> on Server A to keep identical disks. When the ggated on Server B
> actually goes down, the whole setup freezes, until the ggated is back up
> again. Second on network delays gmirror looses, having to sync all over
> again. Leaving the machine at risk.
The freezing has come to a end, with the patch attached, but is the
patch the right way to go (as C coding is not my strongest point)?
# Create backup filesystem & export it
serverB$ truncate -s100m /root/ha-slave.img
serverB$ echo "192.168.33.41 RW /root/ha-slave.img" > /etc/gg.exports
# Apply attached patch
serverA$ cd /usr/src/sbin/ggate/ggatec
serverA$ patch < %%ATTACHED_FILE%%
serverA$ make clean install
# Local file image
serverA$ truncate -s 100m /root/ha-master.img
serverA$ mdconfig -t vnode -f /root/ha-master.img
#Remote file image
serverA$ ggatec create 192.168.33.42 /root/ha-slave.img
# Mirror building
serverA$ gmirror label hamirror ggate0 md0
serverA$ newfs /dev/mirror/hamirror
serverA$ mount /dev/mirror/hamirror /mnt
Note: if you have _not_ applied the patch and you kill ggated on
machineB you will notice machineA freeze when trying to write to
something on /mnt or call `gmirror status'. Same applies if you kill
ggatec on machineA without patch.
Using net/ucarp I detect failures on serverA and terminate ggated and
mount the image on serverB.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1644 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090714/39b1cd59/ggatec.c.bin
More information about the freebsd-questions