The clvm package in Debian/Lenny is still based on cman, but it is quite easy to compile its source in order to use openAIS instead. I won't develop here the full process on how to install the build environment for dpkg nor the source, please refer to the large number of howto's.
Compile the package
- The package libopenais-dev is required. Please install it.
- in ~/src/clvm/lvm2-2.02.39/debian/clvm.init: remove everything related to cman and cluster.conf
- in ~/src/clvm/lvm2-2.02.39/debian/control: modify the dependies (lvm2
without the version number, openais in place of cman) and modify the comments
accordingly like following:
Package: clvm
Section: admin
Priority: extra
Architecture: any
Depends: ${shlibs:Depends}, lvm2, lsb-base, openais
Description: Cluster LVM Daemon for lvm2
This package provides the clustering interface for lvm2. Instead of
the package powered by debian, this one is not based on the Red Hat's
"cman" cluster infrastructure but on "openais". This provide a light
way to implement Cluster LVM. It allows logical volumes to be created
on shared storage devices (eg Fibre Channel, or iSCSI). - in ~/src/clvm/lvm2-2.02.39/debian/rules: replace cman by openais in the
configure options, and add the PATH where to find the openais libs in:
...
$(STAMPS_DIR)/setup-deb: SOURCE_DIR = $(BUILD_DIR)/source
$(STAMPS_DIR)/setup-deb: DIR = $(BUILD_DIR)/build-deb
$(STAMPS_DIR)/setup-deb: $(STAMPS_DIR)/source
rm -rf $(DIR)
cp -al $(SOURCE_DIR) $(DIR)
cd $(DIR); \
./configure CFLAGS="$(CFLAGS)" \
LDFLAGS="-L/usr/lib/openais" \
$(CONFIGURE_FLAGS) \
--with-optimisation="" \
--with-clvmd=openais \
--enable-readline
touch $@
... - update the version number and place a comment in changelog (eg with
dch -i
) - install the required libs in order to compile the package then build
it:
~# apt-get build-dep clvm
~# dpkg-buildpackage -rfakeroot -uc -b
Install and configure openAIS and clvm
- Install openais, then follow the provided QUICKSTART instructions (/usr/share/doc/openais/QUICKSTART.gz). In short:
-
- create the user
ais
and the groupais
. mkdir /etc/ais
where you can copy and modify the openais.conf example in from /ush/share/doc/openais/examples.- start aisexec on each nodes; debian does not provide the init script for
it, you must write your own. For now, you can just type
aisexec
, which will start as a daemon by itself.
- create the user
- install the openais version of clvm (eg
dpkg -i clvm_2.02.39-7.acv1_amd64.deb
), then modify /etc/lvm/lvm.conf withlocking_type = 3
in theglobal
section. - Start it with
/etc/init.d/clvm start
(you can first check that everything is OK lauchingclvm -d 1
on each nodes). - and voilà. Don't forget to create an init script for aisexec before you reboot your computers! ;)
Hope that helps!