# High-availability jails



## solskogen (Dec 16, 2010)

exSun/Oracle have a solution called Sun Cluster to have some kind of HA for Solaris zones (like FreeBSD jails) - is there something like that for FreeBSD?

(HA in this context means that if one machine running one or more jails fails, the jail(s) must be rebooted on the other node)


----------



## SirDice (Dec 16, 2010)

There's nothing like that in FreeBSD.


----------



## olav (Dec 16, 2010)

Isn't it possible to hack around this with carp?


----------



## solskogen (Dec 16, 2010)

I think so. You'll also need some kind of HAST for the data as well. 
So that each jail has it's own zpool (mirror) for one of each node in HAST. You also need some ifstated magic. 
And to make or even more fun; I want a active-active prison ;-)


----------



## SirDice (Dec 16, 2010)

What exactly requires HA? The most important thing is usually the service, not the server.


----------



## vermaden (Dec 16, 2010)

solskogen said:
			
		

> exSun/Oracle have a solution called Sun Cluster to have some kind of HA for Solaris zones (like FreeBSD jails) - is there something like that for FreeBSD?
> 
> (HA in this context means that if one machine running one or more jails fails, the jail(s) must be rebooted on the other node)



You could use HAST for shared storage between two Jails, then add heartbeat/carp for shared IP/service (when 'node' with running service is down do that script - by carp/heartbeat start the IP/service on the other node).

... but SUN Cluster on Solaris is 'full fledged' cluster software, like HA-CMP on IBM AIX for example or Veritas Cluster ... we do not have such thing on FreeBSD unfortunately.


----------



## rbelk (Dec 16, 2010)

SirDice said:
			
		

> There's nothing like that in FreeBSD.



SirDice, yes there is. I thought I posted the link on this forum, but alas I can't find it. There is a project that had a video of actually moving a jail from system to system without missing a beat. I'll try to find the link and post it. It was put on the net sometime in June I believe.


----------



## ondra_knezour (Dec 16, 2010)

rbelk said:
			
		

> I thought I posted the link on this forum, but alas I can't find it. There is a project that had a video of actually moving a jail from system to system without missing a beat.



Do you mean [post=41700]this post[/post]?


----------



## rbelk (Dec 16, 2010)

ondra_knezour said:
			
		

> Do you mean [post=41700]this post[/post]?



That's not it, sorry. I will have to hunt for it.


----------



## Galactic_Dominator (Dec 16, 2010)

rbelk said:
			
		

> That's not it, sorry. I will have to hunt for it.


I think you're thinking of the proposed alternative virtualization system presented here:

http://www.7he.at/freebsd/vps/

And carp or heartbeat should in theory work quite well for this although given to amount of customization and testing necessary I wouldn't expect someone able to complete this in a day unless they had done it before.  A detailed howto blog post would generate some people some ad revenue I think.  For simple solutions, HAST on an image/raw file should work well.


----------



## rbelk (Dec 16, 2010)

Galactic_Dominator said:
			
		

> I think you're thinking of the proposed alternative virtualization system presented here:
> 
> http://www.7he.at/freebsd/vps/
> 
> And carp or heartbeat should in theory work quite well for this although given to amount of customization and testing necessary I wouldn't expect someone able to complete this in a day unless they had done it before.  A detailed howto blog post would generate some people some ad revenue I think.  For simple solutions, HAST on an image/raw file should work well.



Thanks Galactic_Dominator, that was the link.


----------



## AndyUKG (Dec 17, 2010)

This VPS looks quite cool, but I don't think it provides an HA solution as per the original question. From scanning through the white paper it seems to provide a live migration similar to VMWare, but this isn't going to help you if the primary machine fails. The copy of the primary server has to be made when the primary server is still up and healthy, so for HA its not a lot of help.

As mentioned earlier, the closest FreeBSD provides (to my knowledge) to something like VCS is CARP with HAST. You could try using CARP without HAST if you have shared storage (ie try and replicate the typical hardware of VCS) but unless you manually add some kind of anti split brain code you are likely to end up in a mess (HAST does include an anti split brain feature).

thanks Andy.


----------

