HA (High availability) on ClearLinux cluster GFS2/PCS/CoroSync/LVM Tutorial

Hi Guys,

I want to write a full tutorial for someone who wants to custom compile HA package to run cluster GFS2 on clear linux.

Senario: I have 1 storage server (Centos 7) and one Clear Linux server (Latest kernel 5.09). The idea is to setup a gfs2 cluster for the two node (one node happens to be iscsi target itself). The reason why I chose centos 7.9 for storage is it supports latest Intel VROC raid.

Step 1) Recompile clear linux kernel to add the following flags
CONFIG_GFS2_FS_LOCKING_DLM=y
CONFIG_GFS2_FS=y

Step 1: Make sure clear linux and centos 7 have same HA packages, that means recompile all HA packages, use the latest if possible. I use
gfs2-utils latest
pacemaker-Pacemaker-1.1.22
lvm2-2_03_08
.resource-agents-4.4.0
pcs-0.10.4
dlm-4.0.
corosync 2.45

some other dependency, like ruby 2.x, python3

Most people dont compile this on centos or anywhere is because there are compile error all over the place. What I encounter is many times you encounter Warning error that prevent you from complete. Thus go to all Makefile and remove all -Wall if you encounter warning error. For PCS I notice that make install_pcsd doesnt do anything, after I did make install I had to copy Makefile from pcs version 0.9x to replace the Makefile of version 0.14 to get it to work.

Any error you find might be due to missing dependency. There could be many, this a difficult job.

  1. After you have all software then follow tutorial on how to create iscsi target and initiatoor (Many tutorials work)
  2. create gfs2 cluster (Folllow redhat guide)

VOILA you are done. Many steps in between, any problem email me and I can help you. At the time of this writing no tutorial on custom HA package. This is bumpy but doable. email mike@xiitec.com if you need help. Glad to help out as I have received help here many times in the past.

3 Likes

Some of these are totally reasonable for us to include in ClearLinux. g2fs-utils obviously we should just add. Can you summarize for me what these actually do? If they’re all reasonable things people may want, we’ll just make a bundle with all of this. The harder part may just be to come up with a good name for the bundle…

This allows multiple servers to work on the same disk. This is better than nfs,cifs,smb is because those are shared at file level where this is at disk level. So with gfs2 the disk is shared.

In order to coordinate the sharing

Gfs2 is the file system type
Gfs2-Util is the tools to manipulate and control the filesystem
Pcs is a tool that control the High Availbility bundle, Eg pacemaker, corosync, dlm.
Resource agent is a dependency to pacemaker that tells pacemaker all available resource type in the system. Eg, Filesystem
LVM , this is to combine multiple physical disk into a bigger one.
All this is require because all servers in the cluster which shares the disk has to coordinate on the locking and the updating of the disk view.

Are these optional components or do they all work together? Are they a dependency of Pcs?

Pcs controls them thus require them. Pcs is like a tool that controls them. Very much like gfs2 util needs gfs2 file system.

So, a pcs bundle with all the dependencies (of pcs, including pcs itself) included would be a good bundle name, right?

awesome

If you need any help compile let me know.

I’m about done with this and it wasn’t too bad, but, I’m not entirely sure I’ve got all the needed bits included properly (I’ve never used any of this, so, I wouldn’t know where to begin).

I’ll make a pcs bundle and make sure it has dependencies for dlm and Pacemaker which should pull in everything else.

What I need, once that becomes available, is for someone to go around and test it and answer things like:

  • what dependencies are missing that are really needed to make this work well (think about a cleanly installed system without anything else)
  • what user IDs and systemd units are needed to make daemons start properly
  • what sort of stateless patches are needed to make things happy about missing stuff in /var and /etc

If you can sink in some time to go over these, that’d be fantastic.

1 Like

I’m about a two years to late to help on this, but I’m going to have a play around trying to do an HA cluster for VM’s running via KVM on two or three Clear Linux hosts (maybe even CA for one of the the VM’s, if I can find the software tooling). Just wondering if there was any update on the information presented in this thread for how to go about it?