HAST: more than one remote nodes, is it possible?

Mikolaj Golub to.my.trociny at gmail.com
Tue Nov 16 21:39:31 UTC 2010


Hi,

So is it possible to have several remote (secondary) nodes with HAST? Although
current version of hastd supports only one remote node, it looks like it is
possible building HAST devices in stack :-)

I tried this under VirtulBox and it worked for me.

Having 2 pairs of hosts I built lower HAST devise on both pairs and then upper
resource using lower as a provider for upper. Any host can be used as primary
for upper in this configuration. To make things more interesting I installed
jail (VIMAGE) on upper device so vm can be moved between 4 hosts.

Below is hast.conf:

----------------------------------------------------------------------

# Stacked HAST -- data are written to 4 nodes (lolek, bolek, chuk and
# gek) and are accessible on one of the nodes as /dev/hast/upper
#
# /dev/hast/upper
#        |
#        P------------upper-------------S
#        |         172.20.68.30         |
# /dev/hast/lower                /dev/hast/lower
#        |                              |
#        P-----lower----S               P----lower-----S
#        | 172.20.68.31 |               | 172.20.68.32 |
#     /dev/ad4       /dev/ad4        /dev/ad4       /dev/ad4
# 
#      lolek          bolek            chuk           gek

exec /etc/vip.sh

resource lower {

	local /dev/ad4

	on lolek {
		remote bolek
	}

	on bolek {
		remote lolek
	}

	on chuk {
		remote gek
	}

	on gek {
		remote chuk
	}
}

resource upper {

	local /dev/hast/lower
	# XXX: HAST should be patched to know friends 
	friends lolek bolek chuk gek

	on lolek {
		remote 172.20.68.32
	}

	on bolek {
		remote 172.20.68.32
	}

	on chuk {
		remote 172.20.68.31
	}

	on gek {
		remote 172.20.68.31
	}
}

----------------------------------------------------------------------

As it is noted in the comments above hastd should be patched: current version
of hastd allows only connections from addresses specified as remote. The patch
is attached.

/etc/vip.sh is used to switch IP addresses between hosts.

Details can be found here:

http://code.google.com/p/hastmon/wiki/StackedHAST

-- 
Mikolaj Golub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hastd.friends.patch
Type: text/x-patch
Size: 7086 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20101116/b0b8bbed/hastd.friends.bin


More information about the freebsd-fs mailing list