読者です 読者をやめる 読者になる 読者になる

mokky14's IT diary

IT関係の仕事メモ、勉強会の感想など書いてます。

Pacemaker+Heartbeatを試してみる(インストール編)

CentOS Pacemaker

CentOS6でPacemaker、Heartbeatをインストールした時のメモ。

OSデフォルトのものではなく、Linux-HAのサイトからダウンロードしたパッケージを使用する。
RHEL6用リポジトリパッケージからリポジトリパッケージをダウンロードし、/tmpに展開。
展開先は必ず/tmpにする必要があるっぽい。

[root@cent6 ~]# cd /tmp
[root@cent6 tmp]# tar xvzf ~/pacemaker-1.0.13-1.2.el6.x86_64.repo.tar.gz 

展開したリポジトリ指定でyum実行。

[root@cent6 tmp]# cd pacemaker-1.0.13-1.2.el6.x86_64.repo/
[root@cent6 pacemaker-1.0.13-1.2.el6.x86_64.repo]# yum -c pacemaker.repo install \
pacemaker pm_crmgen pm_diskd pm_logconv-hb pm_extras
base                                                  | 3.7 kB     00:00     
base/primary_db                                       | 4.4 MB     00:08     
epel/metalink                                         | 4.9 kB     00:00     
epel                                                  | 4.4 kB     00:00     
epel/primary_db                                       | 6.0 MB     00:11     
extras                                                | 3.4 kB     00:00     
extras/primary_db                                     |  19 kB     00:00     
pacemaker                                             | 2.9 kB     00:00 ... 
pacemaker/primary_db                                  |  25 kB     00:00 ... 
pgdg92                                                | 3.7 kB     00:00     
pgdg92/primary_db                                     | 102 kB     00:00     
updates                                               | 3.4 kB     00:00     
updates/primary_db                                    | 2.6 MB     00:04     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pacemaker.x86_64 0:1.1.10-14.el6_5.2 will be installed
--> Processing Dependency: pacemaker-libs = 1.1.10-14.el6_5.2 for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: pacemaker-cluster-libs = 1.1.10-14.el6_5.2 for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: pacemaker-cli = 1.1.10-14.el6_5.2 for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libtransitioner.so.2()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libstonithd.so.2()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libpengine.so.4()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libpe_status.so.4()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libpe_rules.so.2()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: liblrmd.so.1()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libcrmservice.so.1()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libcrmcommon.so.3()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libcrmcluster.so.4()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
--> Processing Dependency: libcib.so.3()(64bit) for package: pacemaker-1.1.10-14.el6_5.2.x86_64
---> Package pm_crmgen.noarch 0:1.4-1.el6 will be installed
---> Package pm_diskd.x86_64 0:1.3-1.el6 will be installed
--> Processing Dependency: heartbeat >= 3.0.3 for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: cluster-glue >= 1.0.6 for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: libplumb.so.2()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
---> Package pm_extras.x86_64 0:1.4-1.el6 will be installed
--> Processing Dependency: libhbclient.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcib.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
---> Package pm_logconv-hb.noarch 0:1.3-1.el6 will be installed
--> Processing Dependency: pacemaker < 1.1 for package: pm_logconv-hb-1.3-1.el6.noarch
--> Running transaction check
---> Package cluster-glue.x86_64 0:1.0.11-1.el6 will be installed
--> Processing Dependency: libopenhpi.so.2()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMIutils.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMIposix.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMI.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
---> Package cluster-glue-libs.x86_64 0:1.0.11-1.el6 will be installed
---> Package heartbeat.x86_64 0:3.0.5-1.1.el6 will be installed
---> Package heartbeat-libs.x86_64 0:3.0.5-1.1.el6 will be installed
---> Package pacemaker-cli.x86_64 0:1.1.10-14.el6_5.2 will be installed
---> Package pacemaker-cluster-libs.x86_64 0:1.1.10-14.el6_5.2 will be installed
---> Package pacemaker-libs.x86_64 0:1.1.10-14.el6_5.2 will be installed
---> Package pm_diskd.x86_64 0:1.3-1.el6 will be installed
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
---> Package pm_extras.x86_64 0:1.4-1.el6 will be installed
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcib.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
---> Package pm_logconv-hb.noarch 0:1.3-1.el6 will be installed
--> Processing Dependency: pacemaker < 1.1 for package: pm_logconv-hb-1.3-1.el6.noarch
--> Running transaction check
---> Package OpenIPMI-libs.x86_64 0:2.0.16-14.el6 will be installed
---> Package openhpi-libs.x86_64 0:2.14.1-6.el6 will be installed
---> Package pm_diskd.x86_64 0:1.3-1.el6 will be installed
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_diskd-1.3-1.el6.x86_64
---> Package pm_extras.x86_64 0:1.4-1.el6 will be installed
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
--> Processing Dependency: libcib.so.1()(64bit) for package: pm_extras-1.4-1.el6.x86_64
---> Package pm_logconv-hb.noarch 0:1.3-1.el6 will be installed
--> Processing Dependency: pacemaker < 1.1 for package: pm_logconv-hb-1.3-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: pm_extras-1.4-1.el6.x86_64 (pacemaker)
           Requires: libcrmcommon.so.2()(64bit)
           Available: pacemaker-libs-1.0.13-1.el6.x86_64 (pacemaker)
               libcrmcommon.so.2()(64bit)
           Available: pacemaker-libs-1.1.10-14.el6.i686 (base)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.1.i686 (updates)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.2.i686 (updates)
               Not found
Error: Package: pm_logconv-hb-1.3-1.el6.noarch (pacemaker)
           Requires: pacemaker < 1.1
           Available: pacemaker-1.0.13-1.el6.x86_64 (pacemaker)
               pacemaker = 1.0.13-1.el6
           Available: pacemaker-1.1.10-14.el6.x86_64 (base)
               pacemaker = 1.1.10-14.el6
           Available: pacemaker-1.1.10-14.el6_5.1.x86_64 (updates)
               pacemaker = 1.1.10-14.el6_5.1
           Installing: pacemaker-1.1.10-14.el6_5.2.x86_64 (updates)
               pacemaker = 1.1.10-14.el6_5.2
Error: Package: pm_diskd-1.3-1.el6.x86_64 (pacemaker)
           Requires: libcrmcommon.so.2()(64bit)
           Available: pacemaker-libs-1.0.13-1.el6.x86_64 (pacemaker)
               libcrmcommon.so.2()(64bit)
           Available: pacemaker-libs-1.1.10-14.el6.i686 (base)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.1.i686 (updates)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.2.i686 (updates)
               Not found
Error: Package: pm_extras-1.4-1.el6.x86_64 (pacemaker)
           Requires: libcib.so.1()(64bit)
           Available: pacemaker-libs-1.0.13-1.el6.x86_64 (pacemaker)
               libcib.so.1()(64bit)
           Available: pacemaker-libs-1.1.10-14.el6.i686 (base)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.1.i686 (updates)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.2.i686 (updates)
               Not found
Error: Package: pm_diskd-1.3-1.el6.x86_64 (pacemaker)
           Requires: libcrmcluster.so.1()(64bit)
           Available: pacemaker-libs-1.0.13-1.el6.x86_64 (pacemaker)
               libcrmcluster.so.1()(64bit)
           Available: pacemaker-libs-1.1.10-14.el6.i686 (base)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.1.i686 (updates)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.2.i686 (updates)
               Not found
Error: Package: pm_extras-1.4-1.el6.x86_64 (pacemaker)
           Requires: libcrmcluster.so.1()(64bit)
           Available: pacemaker-libs-1.0.13-1.el6.x86_64 (pacemaker)
               libcrmcluster.so.1()(64bit)
           Available: pacemaker-libs-1.1.10-14.el6.i686 (base)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.1.i686 (updates)
               Not found
           Available: pacemaker-libs-1.1.10-14.el6_5.2.i686 (updates)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

何だか大量のエラーが出る。。
Linux-HAのサイトの説明を読むと、OS同梱のpacemakerが展開されないように、pacemakerはバージョン指定でインストールする必要があるっぽい。
念のため、heartbeatもリポジトリ同梱バージョン指定で一緒にインストール。

[root@cent6 pacemaker-1.0.13-1.2.el6.x86_64.repo]# yum -c pacemaker.repo install \
pacemaker-1.0.13 heartbeat-3.0.5 pm_crmgen pm_diskd pm_logconv-hb pm_extras
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package heartbeat.x86_64 0:3.0.5-1.1.el6 will be installed
--> Processing Dependency: heartbeat-libs = 3.0.5-1.1.el6 for package: heartbeat-3.0.5-1.1.el6.x86_64
--> Processing Dependency: cluster-glue-libs for package: heartbeat-3.0.5-1.1.el6.x86_64
--> Processing Dependency: cluster-glue for package: heartbeat-3.0.5-1.1.el6.x86_64
--> Processing Dependency: libplumb.so.2()(64bit) for package: heartbeat-3.0.5-1.1.el6.x86_64
--> Processing Dependency: libhbclient.so.1()(64bit) for package: heartbeat-3.0.5-1.1.el6.x86_64
--> Processing Dependency: libapphb.so.2()(64bit) for package: heartbeat-3.0.5-1.1.el6.x86_64
---> Package pacemaker.x86_64 0:1.0.13-1.el6 will be installed
--> Processing Dependency: pacemaker-libs = 1.0.13-1.el6 for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libtransitioner.so.1()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libstonithd.so.0()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libpengine.so.3()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libpe_status.so.2()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libpe_rules.so.2()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libesmtp.so.5()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libcrmcommon.so.2()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libcrmcluster.so.1()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
--> Processing Dependency: libcib.so.1()(64bit) for package: pacemaker-1.0.13-1.el6.x86_64
---> Package pm_crmgen.noarch 0:1.4-1.el6 will be installed
---> Package pm_diskd.x86_64 0:1.3-1.el6 will be installed
---> Package pm_extras.x86_64 0:1.4-1.el6 will be installed
---> Package pm_logconv-hb.noarch 0:1.3-1.el6 will be installed
--> Running transaction check
---> Package cluster-glue.x86_64 0:1.0.11-1.el6 will be installed
--> Processing Dependency: libopenhpi.so.2()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMIutils.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMIposix.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
--> Processing Dependency: libOpenIPMI.so.0()(64bit) for package: cluster-glue-1.0.11-1.el6.x86_64
---> Package cluster-glue-libs.x86_64 0:1.0.11-1.el6 will be installed
---> Package heartbeat-libs.x86_64 0:3.0.5-1.1.el6 will be installed
---> Package libesmtp.x86_64 0:1.0.4-16.el6 will be installed
---> Package pacemaker-libs.x86_64 0:1.0.13-1.el6 will be installed
--> Running transaction check
---> Package OpenIPMI-libs.x86_64 0:2.0.16-14.el6 will be installed
---> Package openhpi-libs.x86_64 0:2.14.1-6.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                Arch        Version             Repository      Size
=============================================================================
Installing:
 heartbeat              x86_64      3.0.5-1.1.el6       pacemaker      162 k
 pacemaker              x86_64      1.0.13-1.el6        pacemaker      5.6 M
 pm_crmgen              noarch      1.4-1.el6           pacemaker       47 k
 pm_diskd               x86_64      1.3-1.el6           pacemaker       13 k
 pm_extras              x86_64      1.4-1.el6           pacemaker       25 k
 pm_logconv-hb          noarch      1.3-1.el6           pacemaker       31 k
Installing for dependencies:
 OpenIPMI-libs          x86_64      2.0.16-14.el6       base           473 k
 cluster-glue           x86_64      1.0.11-1.el6        pacemaker      261 k
 cluster-glue-libs      x86_64      1.0.11-1.el6        pacemaker      110 k
 heartbeat-libs         x86_64      3.0.5-1.1.el6       pacemaker      263 k
 libesmtp               x86_64      1.0.4-16.el6        pacemaker       57 k
 openhpi-libs           x86_64      2.14.1-6.el6        base           135 k
 pacemaker-libs         x86_64      1.0.13-1.el6        pacemaker      262 k

Transaction Summary
=============================================================================
Install      13 Package(s)

Total download size: 7.4 M
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/13): OpenIPMI-libs-2.0.16-14.el6.x86_64.rpm        | 473 kB     00:01     
(7/13): openhpi-libs-2.14.1-6.el6.x86_64.rpm          | 135 kB     00:00     
-----------------------------------------------------------------------------
Total                                        3.0 MB/s | 7.4 MB     00:02     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : cluster-glue-libs-1.0.11-1.el6.x86_64                    1/13 
  Installing : heartbeat-libs-3.0.5-1.1.el6.x86_64                      2/13 
  Installing : pacemaker-libs-1.0.13-1.el6.x86_64                       3/13 
  Installing : OpenIPMI-libs-2.0.16-14.el6.x86_64                       4/13 
  Installing : openhpi-libs-2.14.1-6.el6.x86_64                         5/13 
  Installing : cluster-glue-1.0.11-1.el6.x86_64                         6/13 
  Installing : heartbeat-3.0.5-1.1.el6.x86_64                           7/13 
  Installing : libesmtp-1.0.4-16.el6.x86_64                             8/13 
  Installing : pacemaker-1.0.13-1.el6.x86_64                            9/13 
  Installing : pm_diskd-1.3-1.el6.x86_64                               10/13 
  Installing : pm_logconv-hb-1.3-1.el6.noarch                          11/13 
  Installing : pm_extras-1.4-1.el6.x86_64                              12/13 
  Installing : pm_crmgen-1.4-1.el6.noarch                              13/13 
  Verifying  : libesmtp-1.0.4-16.el6.x86_64                             1/13 
  Verifying  : pacemaker-libs-1.0.13-1.el6.x86_64                       2/13 
  Verifying  : pm_diskd-1.3-1.el6.x86_64                                3/13 
  Verifying  : cluster-glue-1.0.11-1.el6.x86_64                         4/13 
  Verifying  : openhpi-libs-2.14.1-6.el6.x86_64                         5/13 
  Verifying  : OpenIPMI-libs-2.0.16-14.el6.x86_64                       6/13 
  Verifying  : pm_logconv-hb-1.3-1.el6.noarch                           7/13 
  Verifying  : pm_crmgen-1.4-1.el6.noarch                               8/13 
  Verifying  : heartbeat-3.0.5-1.1.el6.x86_64                           9/13 
  Verifying  : heartbeat-libs-3.0.5-1.1.el6.x86_64                     10/13 
  Verifying  : cluster-glue-libs-1.0.11-1.el6.x86_64                   11/13 
  Verifying  : pm_extras-1.4-1.el6.x86_64                              12/13 
  Verifying  : pacemaker-1.0.13-1.el6.x86_64                           13/13 

Installed:
  heartbeat.x86_64 0:3.0.5-1.1.el6      pacemaker.x86_64 0:1.0.13-1.el6      
  pm_crmgen.noarch 0:1.4-1.el6          pm_diskd.x86_64 0:1.3-1.el6          
  pm_extras.x86_64 0:1.4-1.el6          pm_logconv-hb.noarch 0:1.3-1.el6     

Dependency Installed:
  OpenIPMI-libs.x86_64 0:2.0.16-14.el6                                       
  cluster-glue.x86_64 0:1.0.11-1.el6                                         
  cluster-glue-libs.x86_64 0:1.0.11-1.el6                                    
  heartbeat-libs.x86_64 0:3.0.5-1.1.el6                                      
  libesmtp.x86_64 0:1.0.4-16.el6                                             
  openhpi-libs.x86_64 0:2.14.1-6.el6                                         
  pacemaker-libs.x86_64 0:1.0.13-1.el6                                       

Complete!

インストール成功。


(追記)
ネットワーク接続できない環境でpacemakerをインストールする時のコマンド。

[root@cent6 pacemaker-1.0.13-1.2.el6.x86_64.repo]# yum -c pacemaker.repo --disablerepo='*' --enablerepo=pacemaker \
install pacemaker-1.0.13 heartbeat-3.0.5 pm_crmgen pm_diskd pm_logconv-hb pm_extr

CentOSデフォルトのPacemakerがインストール済みの環境だとインストールに失敗するため、アンインストールしてからインストールする。

# rpm -aq|grep pacemaker
pacemaker-cluster-libs-1.1.7-6.el6.x86_64
pacemaker-cli-1.1.7-6.el6.x86_64
pacemaker-libs-1.1.7-6.el6.x86_64
pacemaker-1.1.7-6.el6.x86_64
# rpm -e pacemaker pacemaker-cluster-libs pacemaker-cli pacemaker-libs pm_extras