{"id":6390,"date":"2014-11-10T10:35:04","date_gmt":"2014-11-10T08:35:04","guid":{"rendered":"http:\/\/blog.zhaw.ch\/icclab\/?p=6390"},"modified":"2014-11-14T11:05:38","modified_gmt":"2014-11-14T09:05:38","slug":"use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/","title":{"rendered":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster"},"content":{"rendered":"<p>In the Linux world, a popular approach to build highly available clusters is with a set of software tools that include\u00a0<a href=\"http:\/\/clusterlabs.org\/\" target=\"_blank\">pacemaker<\/a>\u00a0(as resource manager) and\u00a0<a href=\"http:\/\/corosync.github.io\/corosync\/\" target=\"_blank\">corosync<\/a>\u00a0(as the group communication system), plus other libraries on which they depend and some configuration\u00a0utilities.<\/p>\n<p>On <a href=\"http:\/\/illumos.org\/\" target=\"_blank\">Illumos<\/a> (and in our particular case, <a href=\"http:\/\/omnios.omniti.com\/\" target=\"_blank\">OmniOS<\/a>), the <a href=\"https:\/\/www.illumos.org\/projects\/ihac\" target=\"_blank\">ihac<\/a> project is\u00a0abandoned and I couldn&#8217;t find any other platform-specific open source and mature framework for clustering. Porting pacemaker to <a href=\"http:\/\/omnios.omniti.com\/\">OmniOS<\/a>\u00a0is an option and this post is about\u00a0our experience with this task.<\/p>\n<p>The objective of the post is to describe how to get an <a href=\"http:\/\/clusterlabs.org\/doc\/en-US\/Pacemaker\/1.1\/html-single\/Clusters_from_Scratch\/#_types_of_pacemaker_clusters\">active\/passive<\/a> pacemaker cluster running on <a href=\"http:\/\/omnios.omniti.com\/\">OmniOS<\/a> and to test it with a <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-Dummy.html\">Dummy<\/a> resource agent. The use case (or test case) is not relevant, but\u00a0what should be achieved in a correctly configured cluster is that, if the node of the cluster running the <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-Dummy.html\">Dummy<\/a> resource (active node) fails, then that resource should fail-over and be started on the other node (high availability).<\/p>\n<p>I will assume to start from a <a href=\"http:\/\/omnios.omniti.com\/wiki.php\/Installation\">fresh installation<\/a> of OmniOS <a href=\"http:\/\/omnios.omniti.com\/wiki.php\/Installation#FromCDiso\">151012<\/a>\u00a0with a working network configuration (and ssh, for your comfort!). Check the <a href=\"http:\/\/omnios.omniti.com\/wiki.php\/GeneralAdministration\">general administration guide<\/a>, if needed.<\/p>\n<p>This is what we will cover:<\/p>\n<ul>\n<li>Configuring the machines<\/li>\n<li>Patching and compiling the tools<\/li>\n<li>Running pacemaker and corosync from <a href=\"https:\/\/www.illumos.org\/man\/5\/smf\">SMF<\/a><\/li>\n<li>Running an active\/passive cluster with two nodes to manage the <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-Dummy.html\">Dummy resource<\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h1>Installing packages<\/h1>\n<p>Some packages are installed from the default repositories, but others need to be retrieved from <a href=\"http:\/\/www.opencsw.org\/\">opencsw<\/a>.<\/p>\n<p>Install from default repositories:<\/p>\n<pre># pkg install developer\/gnu-binutils text\/gnu-grep \\\r\n rsync gnu-tar wget text\/gnu-sed compatibility\/ucb text\/gawk\\\r\n autoconf gnu-m4 system\/header header-math \\\r\n ipmitool gnu-make developer\/build\/libtool library\/libtool\/libltdl \\\r\n library\/ncurses library\/security\/openssl text\/gnu-gettext \\\r\n developer\/versioning\/mercurial \\\r\n developer\/versioning\/git \\\r\n SUNWcs driver\/network\/ofk system\/header \\\r\n developer\/library\/lint developer\/object-file \\\r\n system\/library\/mozilla-nss\/header-nss library\/nspr\/header-nspr \\\r\n xz pkg:\/\/omnios\/developer\/swig \\\r\n package\/pkg file\/gnu-coreutils \\\r\n system\/header\/header-picl developer\/gcc48 \\\r\n developer\/build\/automake<\/pre>\n<p>Install the OpenCSW utility and\u00a0update the repos:<\/p>\n<pre># pkgadd -d http:\/\/get.opencsw.org\/now\r\n# \/opt\/csw\/bin\/pkgutil -U<\/pre>\n<p>Install the packages from CSW:<\/p>\n<pre># \/opt\/csw\/bin\/pkgutil -i ggettext pkgconfig libnet gnutls libgnutls_dev libgnutls13 libev_dev libevent_dev libgcrypt11<\/pre>\n<h1>Configure the environment<\/h1>\n<h2>Variables<\/h2>\n<p>Some environment variables will be needed by the tools and scripts, but also during the building process. The easiest thing is\u00a0to create a file (e.g., pacemaker.rc) and source it to get the pacemaker environment ready. You may want to separate the variables needed only for running the tools from the various flags needed during the build.<\/p>\n<p><strong>NOTE<\/strong>: there should be no particular reason to change the installation prefix (PREFIX), but if you need to, please adapt\u00a0also to the remaining part of the instructions to that change, where needed.<\/p>\n<p>Content of pacemaker.rc:<\/p>\n<pre class=\"line\">export PCMK_ipc_type=socket\r\nexport PREFIX=\/opt\r\nexport CFLAGS='-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -DNAME_MAX=255 -DHOST_NAME_MAX=255 -I\/opt\/gcc-4.8.1\/include -I\/usr\/include -I${PREFIX}\/include -I\/opt\/ha\/include -I\/opt\/gcc-4.8.1\/lib\/gcc\/i386-pc-solaris2.11\/4.8.1\/include\/ -lsocket -lnsl'\r\nexport LDFLAGS='-R\/usr\/gnu\/lib -L${PREFIX}\/lib -L\/opt\/gcc-4.8.1 -L\/usr\/gnu\/lib -L\/lib -L\/usr\/lib'\r\nexport PATH=\/usr\/gnu\/bin:\/opt\/gcc-4.8.1\/bin\/:\/opt\/csw\/bin:\/usr\/gnu\/bin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:$PREFIX\/bin:\/sbin\/:\/opt\/csw\/gnu\/:${PREFIX}\/sbin\r\nexport PKG_CONFIG_PATH='\/opt\/lib\/pkgconfig:\/usr\/lib\/pkgconfig:\/usr\/local\/lib\/pkgconfig'\r\nexport PKG_CONFIG_LIBDIR='\/opt\/lib\/pkgconfig:\/usr\/lib\/pkgconfig:\/usr\/local\/lib\/pkgconfig'\r\nexport PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=yes\r\nexport PKG_CONFIG_ALLOW_SYSTEM_LIBS=yes\r\nexport LCRSODIR=\/usr\/libexec\/lcrso \r\nexport CLUSTER_USER=hacluster\r\nexport CLUSTER_GROUP=haclient\r\nexport BUILDPATH=\/export\/builds\r\nexport LD_ALTEXEC=\/usr\/gnu\/i386-pc-solaris2.11\/bin\/ld\r\nexport CONFIG_SHELL=\/usr\/gnu\/bin\/sh\r\nexport PYTHONPATH=${PREFIX}\/lib\/python2.6\/site-packages\r\nexport OCF_ROOT=\/opt\/usr\/lib\/ocf<\/pre>\n<p>Then source the file to have the configuration on the current shell:<\/p>\n<pre># source pacemaker.rc<\/pre>\n<p>Now update the library path on the system to include the CSW objects:<\/p>\n<pre># crle\u00a0-l\u00a0\/opt\/csw\/lib\/\u00a0-u<\/pre>\n<h2>Folders<\/h2>\n<pre># mkdir -p $BUILDPATH\r\n# mkdir -p $PREFIX\/var\r\n# mkdir -p $PREFIX\/lib\/heartbeat\/cores\/$CLUSTER_USER<\/pre>\n<h1>Cluster user and group<\/h1>\n<p>We create the <em>hacluster<\/em> and <em>haclient<\/em> user and group (respectively), that will run the cluster, then we set some permissions on the folders that we created before.<\/p>\n<p>Note that the corosync and pacemaker processes will be run as <em>hacluster<\/em> user (as per the SMF script that comes later), so a common problem when using resource agents will be about missing permission on directories or executables.<\/p>\n<pre># getent group ${CLUSTER_GROUP} &gt;\/dev\/null || groupadd ${CLUSTER_GROUP}\r\n# getent passwd ${CLUSTER_USER} &gt;\/dev\/null || useradd -g ${CLUSTER_GROUP} -d $PREFIX\/lib\/heartbeat\/cores\/$CLUSTER_USER -s \/bin\/bash -c \"cluster user\" ${CLUSTER_USER}\r\n# chown $CLUSTER_USER:$CLUSTER_GROUP $PREFIX\/var\/\r\n# chown $CLUSTER_USER:$CLUSTER_GROUP $PREFIX\/lib\/heartbeat\/cores\/$CLUSTER_USER<\/pre>\n<p>Similarly, hacluster won&#8217;t have enough rights to run write commands such as <em>ipadm create-addr<\/em>, so we give him passwordless sudo powers. If some resource agents that you want to run will need sudo permissions in some of their instructions, then they will need to be patched.<\/p>\n<p>Run<\/p>\n<pre># visudo<\/pre>\n<p>then append this at the end of the file to have the passwordless sudo:<\/p>\n<pre>hacluster\u00a0\u00a0\u00a0\u00a0ALL=(ALL)\u00a0NOPASSWD:\u00a0ALL<\/pre>\n<p>An alternative would be to set appropriate Role-Based Access Control (RBAC) authorizations.<\/p>\n<p><strong>UPDATE<\/strong>: running pacemaker and corosync as root should work without issues. So you can edit the SMF script and use &#8220;root&#8221; instead of &#8220;hacluster&#8221; in the &#8220;CLUSTER_USER&#8221; variable.<\/p>\n<h1>Hostnames<\/h1>\n<p>Set the hostnames of both machines by appending an entry at the end of <em>\/etc\/hosts\u00a0<\/em>(use the output of <em>uname -n\u00a0<\/em>to get the symbolic name), example:<\/p>\n<pre>10.0.100.10 \u00a0 \u00a0 ha-test-1<\/pre>\n<p>Check that from each machine you can ping the other with the symbolic name.<\/p>\n<h1>Installation of the tools<\/h1>\n<p>This section will provide indications on which tools to build and install and how. Install them in the order shown here below.<\/p>\n<p>This information is re-elaborated\u00a0from <a href=\"http:\/\/grueni.github.io\/libqb\/\">Andreas page on libqb<\/a>\u00a0(check credits and references).<\/p>\n<p>I will mention the version of the tools that I used on my setup (or explicitly add a checkout command). You are encouraged to try the latest &#8220;masters\/tips&#8221; when available, but that might need patching work not documented here.<\/p>\n<p>Also, the fact that code is compiling really doesn&#8217;t mean much. There will be differences, such as expected return values, between Linux and Solaris that will break the code at runtime. With the patches here described, I managed to run correctly the <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-Dummy.html\">Dummy<\/a>, <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-IPaddr.html\">IPaddr<\/a> and <a href=\"https:\/\/github.com\/skiselkov\/stmf-ha\">ZFS<\/a> resources, but the line of code that will crash everything will be executed sooner or later, I haven&#8217;t just traversed that code yet :D!<\/p>\n<h2>General note on configure.ac and Makefile.am<\/h2>\n<p>I had the need to do this change for many packages, so I will document it here as a general note and reference this paragraph if this change is needed to compile a certain package.<\/p>\n<p>So if you see the note &#8220;<span style=\"color: #ff0000\">apply the changes described in the general section about configure.ac and Makefile.am<\/span>&#8221; during the installation instructions of a package, come back to this paragraph and do the two changes described here below.<\/p>\n<p>Add the following line in <em>configure.ac<\/em>, after the <em>AC_INIT<\/em> directive:<\/p>\n<pre>AC_CONFIG_MACRO_DIR([\/opt\/csw\/share\/aclocal\/])<\/pre>\n<p>If <em>Makefile.am<\/em> already has an\u00a0<em>ACLOCAL_AMFLAGS<\/em> variable, then append<\/p>\n<pre>-I\/opt\/csw\/share\/aclocal\/<\/pre>\n<p>to that line, otherwise add the complete entry<\/p>\n<pre>ACLOCAL_AMFLAGS=-I\/opt\/csw\/share\/aclocal\/<\/pre>\n<h2>help2man<\/h2>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/ftp.hawo.stw.uni-erlangen.de\/gnu\/help2man\/help2man-1.46.1.tar.xz\r\n# tar xf help2man\\-1.46.1.tar.xz\r\n# cd help2man\\-1.46.1\r\n# .\/configure\r\n# make\r\n# make install<\/pre>\n<h2 id=\"libtool\">libtool<\/h2>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/ftp.gnu.org\/gnu\/libtool\/libtool-2.4.2.tar.gz\r\n# tar zxf libtool-2.4.2.tar.gz\r\n# cd libtool\\-2.4.2\r\n# ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/bootstrap\r\n# chmod +x libltdl\/config\/install\\-sh\r\n# .\/configure\r\n# make install<\/pre>\n<h2>libesmtp<\/h2>\n<pre># cd $BUILDPATH\r\n# export CFLAGS='-std=c89 -D__EXTENSIONS__ -DNAME_MAX=255 -DHOST_NAME_MAX=255'\r\n# wget http:\/\/www.stafford.uklinux.net\/libesmtp\/libesmtp-1.0.6.tar.gz\r\n# gtar zxf libesmtp-1.0.6.tar.gz\r\n# cd libesmtp-1.0.6\r\n# mkdir m4\r\n# autoreconf -i\r\n# .\/configure --prefix=$PREFIX \r\n# perl -pi -e 's#\/\/ TODO: handle GEN_IPADD##' smtp-tls.c\r\n# gmake\r\n# gmake install \r\n# cp auth-client.h $PREFIX\/include\r\n# cp auth-plugin.h $PREFIX\/include\r\n# cp libesmtp.h $PREFIX\/include\r\n# unset CFLAGS\r\n# export CFLAGS='-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -DNAME_MAX=255 -DHOST_NAME_MAX=255 -I\/opt\/gcc-4.8.1\/include -I\/usr\/include -I${PREFIX}\/include -I\/opt\/ha\/include -I\/opt\/gcc-4.8.1\/lib\/gcc\/i386-pc-solaris2.11\/4.8.1\/include\/ -lsocket -lnsl'<\/pre>\n<h2>check<\/h2>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/sourceforge.net\/projects\/check\/files\/check\/0.9.8\/check-0.9.8.tar.gz\r\n# gtar zxf check-0.9.8.tar.gz\r\n# cd check-0.9.8<\/pre>\n<p>Edit the <em>configure.ac<\/em> file to add two lines (just after <em>AC_CONFIG_MACRO_DIR([m4])<\/em> ):<\/p>\n<pre> m4_pattern_allow([AM_PROG_AR])\r\n AM_PROG_AR<\/pre>\n<p>Then continue with the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 autoreconf --install\r\n# .\/configure \r\n# make\r\n# make install<\/pre>\n<h2>asciidoc<\/h2>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/sourceforge.net\/projects\/asciidoc\/files\/asciidoc\/8.6.8\/asciidoc-8.6.8.tar.gz\r\n# gtar zxf asciidoc-8.6.8.tar.gz\r\n# cd asciidoc-8.6.8\r\n# .\/configure\r\n# gmake install<\/pre>\n<h2>cluster glue<\/h2>\n<p>(Note: I used version\u00a02ce85bfab4c1 for my setup)<\/p>\n<pre># cd $BUILDPATH\r\n# wget -O cluster-glue.tar.bz2 http:\/\/hg.linux-ha.org\/glue\/archive\/tip.tar.bz2\r\n# gtar jxf cluster-glue.tar.bz2\r\n# cd Reusable-Cluster-Components-*\r\n# perl -pi -e 's#\\$\\(XSLTPROC\\) \\\\#\\$\\(XSLTPROC\\) --novalid \\\\#g' doc\/Makefile.am<\/pre>\n<p>Search for &#8220;solaris&#8221; in\u00a0<em>configure.ac<\/em>\u00a0and match that section with the following (you should only add the <em>CFLAGS<\/em> line):<\/p>\n<pre>*solaris*)\r\n       REBOOT_OPTIONS=\"-n\"\r\n       POWEROFF_OPTIONS=\"-n\"\r\n       CFLAGS=\"$CFLAGS -D__EXTENSIONS__\"<\/pre>\n<p>Search for &#8220;cc_supports_flag()&#8221; in <em>configure.ac<\/em> and check that it matches the\u00a0following:<\/p>\n<pre>cc_supports_flag() {\r\n       local CFLAGS=\"$@\"\r\n       AC_MSG_CHECKING(whether $CC supports \"$@\")\r\n       AC_COMPILE_IFELSE([AC_LANG_SOURCE(int main(){return 0;})] ,[RC=0; AC_MSG_RESULT(yes)],[RC=1; AC_MSG_RESULT(no)])\r\n       return $RC\r\n}<\/pre>\n<p>Run:<\/p>\n<pre># .\/autogen.sh \r\n# chmod +x install\\-sh\r\n# sed -i 's\/-fstack-protector-all\/\/g' configure.ac<\/pre>\n<p><span style=\"color: #ff0000\">Then apply the changes described in the general section about configure.ac and Makefile.am.<\/span><\/p>\n<p>Complete the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 autoreconf --install\r\n# LDFLAGS='-L\/opt\/csw\/lib' .\/configure --prefix=$PREFIX --enable-fatal-warnings=no --enable-doc=no --with-daemon-user=${CLUSTER_USER} --with-daemon-group=${CLUSTER_GROUP}\r\n# make\r\n# make install<\/pre>\n<h2>Resource agents<\/h2>\n<p>(Note: I used version b644395\u00a0for my setup)<\/p>\n<pre># cd $BUILDPATH\r\n# wget -O resource-agents.tar.gz https:\/\/github.com\/ClusterLabs\/resource-agents\/tarball\/master\r\n# gtar zxvf resource-agents.tar.gz\r\n# cd ClusterLabs-resource-agents-*\/\r\n# ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/autogen.sh\r\n# chmod +x install\\-sh\r\n# .\/configure --prefix=$PREFIX\r\n# gmake clean\r\n# gmake\r\n# gmake install<\/pre>\n<h2>libqb<\/h2>\n<pre># cd $BUILDPATH \r\n# git clone https:\/\/github.com\/ClusterLabs\/libqb.git libqb\r\n# cd libqb\r\n# git checkout v0.17.1<\/pre>\n<p><span style=\"color: #ff0000\">Then apply the changes described in the general section about configure.ac and Makefile.am.<\/span><\/p>\n<p>Complete the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/autogen.sh\r\n# LDFLAGS='-R\/opt\/gcc-4.8.1\/lib' CFLAGS=\"-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__ -march=i486 -mtune=native\" .\/configure --prefix=$PREFIX --enable-debug --with-check=yes --enable-slow-tests\r\n# make clean\r\n# make\r\n# make install<\/pre>\n<h2>libstatgrab<\/h2>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/dl.ambiweb.de\/mirrors\/ftp.i-scream.org\/libstatgrab\/libstatgrab-0.91.tar.gz\r\n# gtar zxvf libstatgrab-0.91.tar.gz\r\n# cd libstatgrab-0.91\r\n# ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/configure --prefix=$PREFIX \r\n# make\r\n# make install<\/pre>\n<h2>corosync<\/h2>\n<p>Get the sources:<\/p>\n<pre># cd $BUILDPATH\r\n# git clone https:\/\/github.com\/corosync\/corosync.git corosync\r\n# cd corosync\r\n# git checkout v2.3.4<\/pre>\n<p>Set the environment:<\/p>\n<pre># export LDFLAGS='-R\/opt\/gcc-4.8.1\/lib -R\/usr\/lib\/mps -R\/opt\/lib -L\/opt\/gcc-4.8.1\/lib -L\/usr\/lib\/mps -L\/opt\/lib -lnss3 -lsmime3 -lssl3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lposix4'\r\n# export nss_CFLAGS='-I\/usr\/include\/mps'\r\n# export nss_LIBS='-R\/usr\/lib\/mps -L\/usr\/lib\/mps'\r\n# export PKG_CONFIG_PATH='\/opt\/lib\/pkgconfig:\/usr\/lib\/pkgconfig:\/usr\/local\/lib\/pkgconfig'\r\n# export PKG_CONFIG_LIBDIR='\/opt\/lib\/pkgconfig:\/usr\/lib\/pkgconfig:\/usr\/local\/lib\/pkgconfig'\r\n# export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=yes\r\n# export PKG_CONFIG_ALLOW_SYSTEM_LIBS=yes<\/pre>\n<p>In case of previous failed attempts, clean the configuration cache:<\/p>\n<pre># rm config.status\r\n# rm -rf autom4te.cache<\/pre>\n<p><span style=\"color: #ff0000\">Apply the changes described in the general section about configure.ac and Makefile.am.<\/span><\/p>\n<p>Complete the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/autogen.sh\r\n# .\/configure --prefix=$PREFIX --localstatedir=$PREFIX\/var --enable-monitoring --enable-snmp --enable-xmlconf --enable-testagents -enable-augeas --enable-debug --enable-coverage\r\n# make\r\n# make install<\/pre>\n<p>Now logout and login again from your shell, then source <em>pacemaker.rc<\/em> to continue from a clean environment.<\/p>\n<h2>heartbeat<\/h2>\n<p>Get the sources:<\/p>\n<pre># cd $BUILDPATH\r\n# wget http:\/\/hg.linux-ha.org\/heartbeat-STABLE_3_0\/archive\/tip.tar.bz2\r\n# gtar jxf tip.tar.bz2\r\n# cd Heartbeat-3-0-*\/<\/pre>\n<p><span style=\"color: #ff0000\">Apply the changes described in the general section about configure.ac and Makefile.am (for heartbeat the file is configure.in).<\/span><\/p>\n<p>In case of previous failed attempts, clean the configuration cache:<\/p>\n<pre># rm config.status\r\n# rm -rf autom4te.cache<\/pre>\n<p>Complete the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 autoreconf -i\r\n# CFLAGS=\"-I\/opt\/include -I\/opt\/csw\/include\/ \" LDFLAGS='-R\/opt\/lib -L\/opt\/lib -L\/opt\/csw\/lib\/ -lnsl \/opt\/csw\/lib\/libgnutls.so.13 -lsocket' .\/configure --prefix=$PREFIX --enable-quorumd\r\n# chmod +x install\\-sh\r\n# make CPPFLAGS=\"-L\/opt\/csw\/lib\/ -lgnutls -I\/usr\/include\/glib-2.0\/ -I\/usr\/lib\/glib-2.0\/include\/\"\r\n# make install<\/pre>\n<h2>pacemaker<\/h2>\n<p>Get the sources:<\/p>\n<pre class=\"line\"># cd $BUILDPATH\r\n# git clone https:\/\/github.com\/ClusterLabs\/pacemaker.git pacemaker\r\n# cd pacemaker\r\n# git checkout 272814b6423d4cdc21a0a83cd9007a4d57bd542d<\/pre>\n<p>Set the environment:<\/p>\n<pre># export CFLAGS='-O3 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -march=i486 -mtune=native -I\/usr\/include\/ncurses\/'\r\n# export LDFLAGS=\"-R\/usr\/lib\/mps:\/opt\/gcc-4.8.1\/lib -L'\/usr\/lib\/mps:\/opt\/gcc-4.8.1\/lib' -lssp_nonshared\"\r\n# export PKG_CONFIG_PATH='\/opt\/lib\/pkgconfig:\/usr\/lib\/pkgconfig:\/usr\/local\/lib\/pkgconfig'\r\n# export CONFIG_SHELL=\/usr\/gnu\/bin\/sh<\/pre>\n<p>Patch:<\/p>\n<pre># perl -pi -e 's\/-Wunsigned-char\/\/g' configure.ac\r\n# perl -pi -e 's#-Wunused-but-set-variable##' configure.ac\r\n# perl -pi -e 's\/-fstack-protector-all\/\/g' configure.ac\r\n \r\n# sed -i 's\/\\(ACLOCAL_AMFLAGS\\s*=\\s*\\-I\\s*m4\\)\/\\1 \\-I\\\/opt\\\/csw\\\/share\\\/aclocal\\\/\/g' Makefile.am\r\n \r\n# find . -name \"*.c\" -o -name \"*.h\" | xargs sed -i 's\/syscall\\.h\/sys\\\/syscall\\.h\/g'\r\n# sed -i 's\/reboot(RB_AUTOBOOT)\/reboot(RB_AUTOBOOT, \\\"pacemaker\\\")\/g' lib\/common\/watchdog.c\r\n# sed -i 's\/\\(sysrq_init()\\)\/\\\/\\\/\\1\/g' mcp\/pacemaker.c<\/pre>\n<p>Apply the hack of shame: this is a terrible workaround for the missing\u00a0<em>signalfd<\/em> system call in IllumOS (the patch target is a file named <em>services_linux.c<\/em>!). We just wait 5 seconds for the forked process to finish providing stdout (instead of listening to signals)&#8230;<\/p>\n<p><a href=\"https:\/\/gist.github.com\/vincepii\/b5d8f356a35d535313b5\">Get the patch file from the gist<\/a>, extract it\u00a0and apply it (this will also do minor changes to the Dummy resource agent):<\/p>\n<pre># wget https:\/\/gist.githubusercontent.com\/vincepii\/b5d8f356a35d535313b5\/raw\/5a4a1e8df5691c39531eb5ffb7f6f0a5c0769a0b\/pacemaker.patch\r\n# git apply pacemaker.patch<\/pre>\n<p>Complete the build:<\/p>\n<pre># ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/autogen.sh\r\n# .\/configure --prefix=$PREFIX --enable-fatal-warnings=no --with-corosync --with-cs-quorum --with-acl=no --enable-debug\r\n# make CPPFLAGS=\"-I\/usr\/include\/ -I\/usr\/include\/glib-2.0\/ -I\/usr\/lib\/glib-2.0\/include\/ -I\/usr\/include\/libxml2\/ -I\/opt\/include $CFLAGS\"\r\n# make install<\/pre>\n<p>Post install:<\/p>\n<pre># mkdir -p $PREFIX\/etc\/corosync\/uidgid.d\r\n# (\r\necho \"uidgid {\"\r\necho \" uid: `id -u ${CLUSTER_USER}`\"\r\necho \" gid: `id -g ${CLUSTER_USER}`\"\r\necho \"}\"\r\n) &gt; $PREFIX\/etc\/corosync\/uidgid.d\/uid.conf<\/pre>\n<p>Now logout and login again from your shell, then source <em>pacemaker.rc<\/em> to continue from a clean environment.<\/p>\n<h2>crm<\/h2>\n<pre># cd $BUILDPATH\r\n# git clone https:\/\/github.com\/crmsh\/crmsh.git crmsh\r\n# cd crmsh\r\n# git checkout 0d631cb36655695a67c940cf02c3fabccff705da\r\n# perl -pi -e 's#ps -e -o pid,command#ps -e -o pid,comm#' .\/modules\/utils.py\r\n# perl -pi -e 's#a2x -f manpage#a2x -L -f manpage#' doc\/Makefile.am\r\n# ACLOCAL=aclocal-1.14 AUTOMAKE=automake-1.14 .\/autogen.sh\r\n# .\/configure --prefix=$PREFIX<\/pre>\n<p>Edit the file\u00a0<em>doc\/Makefile.am<\/em>:<\/p>\n<pre># sed -i 's\/a2x -L -f manpage $&lt;\/a2x --no-xmllint -f manpage $&lt;\/g' doc\/Makefile.am<\/pre>\n<p>Complete the build:<\/p>\n<pre># make\r\n# make install<\/pre>\n<p>Post install:<\/p>\n<pre># mkdir -p \/root\/.config\/crm\/\r\n# cp \/opt\/etc\/crm\/crm.conf \/root\/.config\/crm\/<\/pre>\n<p>And this should complete the installation part.<\/p>\n<p>NOTE: if <em>crm<\/em> will not run, complaining about missing <em>readline<\/em> module, then you can use crm with the CSW python (for some reason <em>readline.so<\/em> will not appear in\u00a0<em>\/usr\/lib\/python2.6\/lib-dynload<\/em>).<\/p>\n<p>To do this (only if <em>crm<\/em> is not working), use CSW python as interpreter and reinstall crm:<\/p>\n<pre># \/opt\/csw\/bin\/pkgutil\u00a0-i\u00a0libreadline6\u00a0libreadline_dev\u00a0python\u00a0py_lxml\r\n# cd $BUILDPATH\/crmsh\r\n# sed -i 's\/\\#\\!\\\/usr\\\/bin\\\/python\/\\#\\!\\\/opt\\\/csw\\\/bin\\\/python\/p' crm\r\n# make\r\n# make install<\/pre>\n<h1>Corosync configuration<\/h1>\n<p>Get a sample corosync configuration file from <a href=\"https:\/\/gist.github.com\/vincepii\/86f60ff4ff912a782a67\">this gist<\/a>\u00a0and put it in place:<\/p>\n<pre># wget\u00a0https:\/\/gist.github.com\/vincepii\/86f60ff4ff912a782a67\/raw\/c70603c7af996494ad490aa5ef16613babfe4572\/corosync.conf\r\n# mv corosync.conf ${PREFIX}\/etc\/corosync\/corosync.conf<\/pre>\n<p>Then edit the file and [change] the following fields:<\/p>\n<pre>memberaddr: use the addresses of your members\r\nbindnetaddr: use the address of your network\r\nring0_addr: set the hostname of each node\r\nnodeid: not really necessary to change it, use values that you prefer<\/pre>\n<h1>Fixing permissions<\/h1>\n<p>All these files should already exist (except for <em>corosync.pid<\/em>, unless you had already run corosync for some reason). If one of these commands give an error, do not ignore it!<\/p>\n<pre># chown -R hacluster:haclient ${BUILDPATH}\/corosync\/exec\r\n# chown -R hacluster:haclient ${BUILDPATH}\/corosync\/common_lib\/.libs\r\n# chown -R hacluster:haclient ${PREFIX}\/var\/log\/cluster\r\n# chown hacluster:haclient ${PREFIX}\/var\/run\r\n# touch ${PREFIX}\/var\/run\/corosync.pid\r\n# chown hacluster:haclient ${PREFIX}\/var\/run\/corosync.pid\r\n# chown -R hacluster:haclient \/opt\/var\/lib\r\n# chown -R hacluster:haclient \/opt\/var\/run\/resource-agents\/<\/pre>\n<h1>Setting up Corosync in SMF<\/h1>\n<p>To run corosync as a service in SMF, you will need the manifest and the executable script. You can find both of them on <a href=\"https:\/\/gist.github.com\/vincepii\/2771b79dddd18adb1e51\">gist<\/a>.<\/p>\n<p>Download the manifest and the script and put them in place:<\/p>\n<pre># wget\u00a0https:\/\/gist.github.com\/vincepii\/2771b79dddd18adb1e51\/raw\/f0cc2d8c08419dd44ee9b4e1c2b6290d5c8859f0\/corosync.xml\r\n# wget https:\/\/gist.github.com\/vincepii\/2771b79dddd18adb1e51\/raw\/f744a4ef02fa2e7e4d5a2f9c403cb9e9ff411617\/corosyncd\r\n# mkdir ${PREFIX}\/etc\/smf\r\n# mv corosyncd ${PREFIX}\/etc\/smf\/\r\n# mv corosync.xml ${PREFIX}\/etc\/smf\/\r\n# chmod u+x ${PREFIX}\/etc\/smf\/corosyncd<\/pre>\n<p>Validate the SMF manifest, hopefully you will get no errors.<\/p>\n<pre># svccfg validate ${PREFIX}\/etc\/smf\/corosync.xml<\/pre>\n<p>Import and enable the service:<\/p>\n<pre># svccfg import ${PREFIX}\/etc\/smf\/corosync.xml\r\n# svcadm enable corosync<\/pre>\n<p>Check if the service started:<\/p>\n<pre># svcs\u00a0|\u00a0grep\u00a0corosync<\/pre>\n<p>If everything went well, you should see an output like the following:<\/p>\n<pre>online 12:35:55 svc:\/application\/hacluster\/corosync:default<\/pre>\n<p>If something went wrong, try to get the output of the SMF script with<\/p>\n<pre># cat `svcs -L corosync`<\/pre>\n<p>Now corosync and pacemaker should start at boot. You can disable and enable the service with:<\/p>\n<pre># svcadm disable corosync\r\n# svcadm enable corosync<\/pre>\n<h1>Running the cluster<\/h1>\n<p>You can check the cluster status with:<\/p>\n<pre># crm_mon<\/pre>\n<p>(remember to source pacemaker.rc if the command is not available!)<\/p>\n<p>The output should look similar to the following (note that for this run I had 3 nodes, 2 of which offline, and I set the expected_votes to 1 to have a partition with quorum):<\/p>\n<pre>You need to have curses available at compile time to enable console mode\r\nLast updated: Thu Nov 6 12:44:26 2014\r\nLast change: Thu Nov 6 12:42:01 2014\r\nStack: corosync\r\nCurrent DC: ha-test-1 (80) - partition with quorum\r\nVersion: 1.1.12-272814b\r\n3 Nodes configured\r\n0 Resources configured\r\nNode omni-pcm (20): UNCLEAN (offline)\r\nNode omni-pcm-2 (40): UNCLEAN (offline)\r\nOnline: [ ha-test-1 ]<\/pre>\n<h1>Administer the Dummy resource!<\/h1>\n<p>If you now have configured two nodes to create a pacemaker cluster, the next step is to check that the cluster can administer a resource.<\/p>\n<p>We will use the <a href=\"http:\/\/linux-ha.org\/doc\/man-pages\/re-ra-Dummy.html\">Dummy<\/a> resource, which does nothing other than verifying that it is running. When we start the resource, it will run on one of the nodes. If we kill that node in some way, the Dummy resource should fail over and start running on the other node.<\/p>\n<p>This demonstrates that pacemaker operations are working.<\/p>\n<p>First, let&#8217;s create some symlinks and set some permissions to be sure that pacemaker will find everything accessible:<\/p>\n<pre># ln -s \/usr\/lib\/ocf\/resource.d\/pacemaker \/opt\/usr\/lib\/ocf\/resource.d\/pacemaker\r\n# ln -s \/opt\/usr\/lib\/ocf\/lib\/ \/usr\/lib\/ocf\/lib\r\n# ln -s \/opt\/usr\/lib\/ocf\/resource.d\/heartbeat \/usr\/lib\/ocf\/resource.d\/heartbeat\r\n# chown -R hacluster:haclient \/usr\/lib\/ocf\r\n# chown -R hacluster:haclient \/opt\/usr\/lib\/ocf<\/pre>\n<p>As a basic configuration for our cluster, we disable <a href=\"http:\/\/en.wikipedia.org\/wiki\/STONITH\">STONITH<\/a>\u00a0and\u00a0ignore the no-quorum state (with two nodes, we cannot have a quorum if one of them fails!):<\/p>\n<pre># crm configure property stonith-enabled=false\r\n# crm configure property no-quorum-policy=ignore<\/pre>\n<p>Verify that our configuration so far is correct with<\/p>\n<pre># crm_verify -L -V<\/pre>\n<p>that should print nothing if everything is fine.<\/p>\n<p>Now configure the Dummy resource:<\/p>\n<pre># crm configure primitive dummy ocf:pacemaker:Dummy op monitor interval=120s<\/pre>\n<p>and then check its status (it should be running on one of the nodes):<\/p>\n<pre># crm resource status dummy\r\nresource dummy is running on: ha-test-1<\/pre>\n<p>Now you can verify that if one node stops working (you can simulate this with <em>svcadm disable corosync<\/em>), the Dummy resource will be started on the other node.<\/p>\n<p>You can check the status also with <em>crm_mon<\/em>, that should show something similar to this:<\/p>\n<pre># crm_mon\r\nDefaulting to one-shot mode\r\nYou need to have curses available at compile time to enable console mode\r\nLast updated: Thu Nov 6 16:39:58 2014\r\nLast change: Thu Nov 6 16:34:43 2014\r\nStack: corosync\r\nCurrent DC: ha-test-1 (80) - partition with quorum\r\nVersion: 1.1.12-272814b\r\n3 Nodes configured\r\n1 Resources configured\r\n\r\nOnline: [ ha-test-1 ]\r\nOFFLINE: [ omni-pcm omni-pcm-2 ]\r\n\r\ndummy (ocf::pacemaker:Dummy): Started ha-test-1<\/pre>\n<h1>Conclusions<\/h1>\n<p>If everything worked, you should now have a pacemaker cluster running on OmniOS.<\/p>\n<p>If you need different (i.e., useful) resource agents now (e.g., IPaddr), some patching may be needed for the fact that RA scripts will be run by the <em>hacluster<\/em> user, which, according to this post, doesn&#8217;t have authorizations to perform system changes. Also expect problems in case the hacluster user won&#8217;t have enough rights to read\/write\/traverse some folders that the RA script will want to access. Check the logs (<em>tail -f \/opt\/var\/log\/cluster\/corosync.log<\/em>), debug and fix :). <strong>UPDATE:<\/strong>\u00a0running corosync and pacemaker as root should also work and this simplifies using RAs. Check the \u00a0&#8220;Cluster user and group&#8221; section.<\/p>\n<p>To have a better understanding on pacemaker, please refer to the <a href=\"http:\/\/clusterlabs.org\/doc\/\">official documentation<\/a>.<\/p>\n<h1>Credits<\/h1>\n<p>I want\u00a0to thank Andreas\u00a0Gr\u00fcninger for his great support in helping me with this setup and his contributions to the pacemaker tools that made it possible to run them on Illumos. I re-used the\u00a0SMF manifest and script for corosync that he shared with me (with his permission :)). Also, the general procedure was made available by Andreas at this <a href=\"http:\/\/grueni.github.io\/libqb\/\">page<\/a>.<\/p>\n<p>Many thanks also to\u00a0Sa\u0161o Kiselkov for his <a href=\"http:\/\/zfs-create.blogspot.ch\/2013\/06\/building-zfs-storage-appliance-part-1.html\">in-depth blog post<\/a> on building a HA ZFS storage appliance.<\/p>\n<h1>References<\/h1>\n<ul>\n<li><a href=\"http:\/\/grueni.github.io\/libqb\/\">http:\/\/grueni.github.io\/libqb\/<\/a><\/li>\n<li><a href=\"http:\/\/zfs-create.blogspot.ch\/2013\/06\/building-zfs-storage-appliance-part-1.html\">http:\/\/zfs-create.blogspot.ch\/2013\/06\/building-zfs-storage-appliance-part-1.html<\/a><\/li>\n<li><a href=\"http:\/\/clusterlabs.org\/doc\/en-US\/Pacemaker\/1.1-plugin\/html\/Clusters_from_Scratch\/_adding_a_resource.html\">http:\/\/clusterlabs.org\/doc\/en-US\/Pacemaker\/1.1-plugin\/html\/Clusters_from_Scratch\/_adding_a_resource.html<\/a><\/li>\n<li><a href=\"http:\/\/doc.opensuse.org\/products\/draft\/SLE-HA\/SLE-ha-guide_sd_draft\/cha.ha.manual_config.html\">http:\/\/doc.opensuse.org\/products\/draft\/SLE-HA\/SLE-ha-guide_sd_draft\/cha.ha.manual_config.html<\/a><\/li>\n<\/ul>\n<div class=\"pt-sm\">Schlagw\u00f6rter: <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/corosync\/\">corosync<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/ha\/\">ha<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/high-availability\/\">High Availability<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/illumos\/\">illumos<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/omnios\/\">omnios<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/pacemaker\/\">pacemaker<\/a><br><\/div>","protected":false},"excerpt":{"rendered":"<p>In the Linux world, a popular approach to build highly available clusters is with a set of software tools that include\u00a0pacemaker\u00a0(as resource manager) and\u00a0corosync\u00a0(as the group communication system), plus other libraries on which they depend and some configuration\u00a0utilities. On Illumos (and in our particular case, OmniOS), the ihac project is\u00a0abandoned and I couldn&#8217;t find any [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[5],"tags":[97,172,179,475,476,246],"features":[],"class_list":["post-6390","post","type-post","status-publish","format-standard","hentry","category-articles","tag-corosync","tag-ha","tag-high-availability","tag-illumos","tag-omnios","tag-pacemaker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster - Service Engineering (ICCLab &amp; SPLab)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster\" \/>\n<meta property=\"og:description\" content=\"In the Linux world, a popular approach to build highly available clusters is with a set of software tools that include\u00a0pacemaker\u00a0(as resource manager) and\u00a0corosync\u00a0(as the group communication system), plus other libraries on which they depend and some configuration\u00a0utilities. On Illumos (and in our particular case, OmniOS), the ihac project is\u00a0abandoned and I couldn&#8217;t find any [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Engineering (ICCLab &amp; SPLab)\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-10T08:35:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-14T09:05:38+00:00\" \/>\n<meta name=\"author\" content=\"piiv\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"piiv\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\"},\"author\":{\"name\":\"piiv\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703\"},\"headline\":\"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster\",\"datePublished\":\"2014-11-10T08:35:04+00:00\",\"dateModified\":\"2014-11-14T09:05:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\"},\"wordCount\":1946,\"commentCount\":12,\"keywords\":[\"corosync\",\"ha\",\"High Availability\",\"illumos\",\"omnios\",\"pacemaker\"],\"articleSection\":[\"Articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\",\"name\":\"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster - Service Engineering (ICCLab &amp; SPLab)\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\"},\"datePublished\":\"2014-11-10T08:35:04+00:00\",\"dateModified\":\"2014-11-14T09:05:38+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/icclab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/\",\"name\":\"Service Engineering (ICCLab &amp; SPLab)\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703\",\"name\":\"piiv\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g\",\"caption\":\"piiv\"},\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/author\/piiv\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster - Service Engineering (ICCLab &amp; SPLab)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/","og_locale":"en_US","og_type":"article","og_title":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster","og_description":"In the Linux world, a popular approach to build highly available clusters is with a set of software tools that include\u00a0pacemaker\u00a0(as resource manager) and\u00a0corosync\u00a0(as the group communication system), plus other libraries on which they depend and some configuration\u00a0utilities. On Illumos (and in our particular case, OmniOS), the ihac project is\u00a0abandoned and I couldn&#8217;t find any [&hellip;]","og_url":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/","og_site_name":"Service Engineering (ICCLab &amp; SPLab)","article_published_time":"2014-11-10T08:35:04+00:00","article_modified_time":"2014-11-14T09:05:38+00:00","author":"piiv","twitter_card":"summary_large_image","twitter_misc":{"Written by":"piiv","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/"},"author":{"name":"piiv","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703"},"headline":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster","datePublished":"2014-11-10T08:35:04+00:00","dateModified":"2014-11-14T09:05:38+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/"},"wordCount":1946,"commentCount":12,"keywords":["corosync","ha","High Availability","illumos","omnios","pacemaker"],"articleSection":["Articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/","url":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/","name":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster - Service Engineering (ICCLab &amp; SPLab)","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#website"},"datePublished":"2014-11-10T08:35:04+00:00","dateModified":"2014-11-14T09:05:38+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/icclab\/use-pacemaker-and-corosync-on-illumos-omnios-to-run-a-ha-activepassive-cluster\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/icclab\/"},{"@type":"ListItem","position":2,"name":"Use pacemaker and corosync on Illumos (OmniOS) to run a HA active\/passive cluster"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/icclab\/#website","url":"https:\/\/blog.zhaw.ch\/icclab\/","name":"Service Engineering (ICCLab &amp; SPLab)","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/b75ac4e936b5921c8a9de4fb84202703","name":"piiv","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c7b4c6df4485c24b56af1a1a92442259dfc735b8c0dcf8d3ddcb16f88deeb723?s=96&d=mm&r=g","caption":"piiv"},"url":"https:\/\/blog.zhaw.ch\/icclab\/author\/piiv\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/6390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/comments?post=6390"}],"version-history":[{"count":21,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/6390\/revisions"}],"predecessor-version":[{"id":6701,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/6390\/revisions\/6701"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/media?parent=6390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/categories?post=6390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/tags?post=6390"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/features?post=6390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}