<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://h2o.glou.fr/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>No matter what you call it!</title>
  <link>http://h2o.glou.fr/</link>
  <atom:link href="http://h2o.glou.fr/feed/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Tue, 09 Jun 2009 07:09:41 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>clvm + openais on Debian/Lenny</title>
    <link>http://h2o.glou.fr/post/2009/04/20/clvm-openais-on-Debian/Lenny</link>
    <guid isPermaLink="false">urn:md5:de9112a7c84094a14d6293bb3f86bcf4</guid>
    <pubDate>Mon, 20 Apr 2009 11:18:00 +0200</pubDate>
    <dc:creator>olecam</dc:creator>
        <category>debian</category>
            
    <description>    As pointed by Javier Guerra on the xen-users mailing list, the RedHat's cluster
projet is now based on openAIS. It is then possible to skip cman and fenced
when only clvm (aka without GFS) is needed. This results in a setting easiest
by far! Exactly what I was looking for from always for my xen servers which do
share the same FC storage unit!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Compile the package&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The package libopenais-dev is required. Please install it.&lt;/li&gt;
&lt;li&gt;in ~/src/clvm/lvm2-2.02.39/debian/clvm.init: remove everything related to
cman and cluster.conf&lt;/li&gt;
&lt;li&gt;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:&lt;br /&gt;
&lt;pre&gt;
Package: clvm&lt;br /&gt;
Section: admin&lt;br /&gt;
Priority: extra&lt;br /&gt;
Architecture: any&lt;br /&gt;
Depends: ${shlibs:Depends}, &lt;strong&gt;lvm2&lt;/strong&gt;, lsb-base, &lt;strong&gt;openais&lt;/strong&gt;&lt;br /&gt;
Description: Cluster LVM Daemon for lvm2&lt;br /&gt;
 This package provides the clustering interface for lvm2. Instead of&lt;br /&gt;
 the package powered by debian, this one is not based on the Red Hat's&lt;br /&gt;
 &amp;quot;cman&amp;quot; cluster infrastructure but on &amp;quot;openais&amp;quot;. This provide a light&lt;br /&gt;
 way to implement Cluster LVM. It allows logical volumes to be created&lt;br /&gt;
 on shared storage devices (eg Fibre Channel, or iSCSI).
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;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:&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;
...&lt;br /&gt;
$(STAMPS_DIR)/setup-deb: SOURCE_DIR = $(BUILD_DIR)/source&lt;br /&gt;
$(STAMPS_DIR)/setup-deb: DIR = $(BUILD_DIR)/build-deb&lt;br /&gt;
$(STAMPS_DIR)/setup-deb: $(STAMPS_DIR)/source&lt;br /&gt;
        rm -rf $(DIR)&lt;br /&gt;
        cp -al $(SOURCE_DIR) $(DIR)&lt;br /&gt;
        cd $(DIR); \&lt;br /&gt;
        ./configure CFLAGS=&amp;quot;$(CFLAGS)&amp;quot; \&lt;br /&gt;
                &lt;strong&gt;LDFLAGS=&amp;quot;-L/usr/lib/openais&amp;quot; \&lt;/strong&gt;&lt;br /&gt;
                $(CONFIGURE_FLAGS) \&lt;br /&gt;
                --with-optimisation=&amp;quot;&amp;quot; \&lt;br /&gt;
                &lt;strong&gt;--with-clvmd=openais \&lt;/strong&gt;&lt;br /&gt;
                --enable-readline&lt;br /&gt;
        touch $@&lt;br /&gt;
...
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;update the version number and place a comment in changelog (eg with &lt;q&gt;dch
-i&lt;/q&gt;)&lt;/li&gt;
&lt;li&gt;install the required libs in order to compile the package then build
it:&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;
~# apt-get build-dep clvm&lt;br /&gt;
~# dpkg-buildpackage -rfakeroot -uc -b
&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Install and configure openAIS and clvm&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Install openais, then follow the provided QUICKSTART instructions
(/usr/share/doc/openais/QUICKSTART.gz). In short:&lt;/li&gt;
&lt;li style=&quot;list-style: none&quot;&gt;
&lt;ul&gt;
&lt;li&gt;create the user &lt;q&gt;ais&lt;/q&gt; and the group &lt;q&gt;ais&lt;/q&gt;.&lt;/li&gt;
&lt;li&gt;&lt;q&gt;mkdir /etc/ais&lt;/q&gt; where you can copy and modify the openais.conf
example in from /ush/share/doc/openais/examples.&lt;/li&gt;
&lt;li&gt;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 &lt;q&gt;aisexec&lt;/q&gt;, which
will start as a daemon by itself.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;install the openais version of clvm (eg &lt;q&gt;dpkg -i
clvm_2.02.39-7.acv1_amd64.deb&lt;/q&gt;), then modify /etc/lvm/lvm.conf with
&lt;q&gt;locking_type = 3&lt;/q&gt; in the &lt;q&gt;global&lt;/q&gt; section.&lt;/li&gt;
&lt;li&gt;Start it with &lt;q&gt;/etc/init.d/clvm start&lt;/q&gt; (you can first check that
everything is OK lauching &lt;q&gt;clvm -d 1&lt;/q&gt; on each nodes).&lt;/li&gt;
&lt;li&gt;and voilà. Don't forget to create an init script for aisexec before you
reboot your computers! ;)&lt;/li&gt;
&lt;/ul&gt;
You can get a copy of my own clvm package for openAIS at &lt;a hreflang=&quot;en&quot; href=&quot;http://olecam.online.fr/debian/lenny/clvm_2.02.39-7.acv1_amd64.deb&quot;&gt;http://olecam.online.fr/debian/lenny/clvm_2.02.39-7.acv1_amd64.deb&lt;/a&gt;&lt;br /&gt;

&lt;br /&gt;
Hope that helps!</description>
    
    
    
          <comments>http://h2o.glou.fr/post/2009/04/20/clvm-openais-on-Debian/Lenny#comment-form</comments>
      <wfw:comment>http://h2o.glou.fr/post/2009/04/20/clvm-openais-on-Debian/Lenny#comment-form</wfw:comment>
      <wfw:commentRss>http://h2o.glou.fr/feed/atom/comments/395849</wfw:commentRss>
      </item>
    
</channel>
</rss>