木下 正昭
kinos****@tdc*****
2015年 8月 21日 (金) 19:55:08 JST
TDCソフトの木下です。 山内さん、飯田さん、回答ありがとうございました。 start on started local and runlevel [2345]の設定を pacemaker.combined.confに追記して、OS再起動して自動起動出来ることを確認しました。 ありがとうございました。 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7 TDCソフトウェアエンジニアリング株式会社 クラウド&サービス事業部クラウドオペレーション部 システムエンジニア 木下 正昭 ==<<Masaaki kinoshita>>== E-mail:kinos****@tdc***** -----Original Message----- From: linux****@lists***** [mailto:linux****@lists*****] On Behalf Of Yusuke Iida Sent: Friday, August 21, 2015 7:02 PM To: linux****@lists***** Subject: Re: [Linux-ha-jp] CentOS6.5でpacemaker.combinedで自動起動する方法について TDCソフト 木下さま メトロシステムズの飯田と申します。 pacemaker.combinedを使った時の自動起動方法ですが、 下記の設定をpacemaker.combined.confに追加していただければうまく動くと思います。 start on started local and runlevel [2345] Pacemaker-1.1.13からは上記修正が取り込まれていますので、 コメントアウトを外すだけで自動起動用の設定を行うことができます。 https://github.com/ClusterLabs/pacemaker/blob/Pacemaker-1.1.13/mcp/pacemaker.combined.upstart.in 以上、よろしくお願いします。 2015年8月21日 17:55 木下 正昭 <kinos****@tdc*****>: > はじめまして。 > TDCソフトの木下と申します。 > > 現在、CentOS6.5でpacemaker+corosync+drbd+mysqlで環境構築をしております。 > > Linux-HAからリポジトリ(pacemaker-repo-1.1.12-1.1.el6.x86_64.rpm)をインストールして、 > yum install pacemaker-allでインストールしています。 > > 各バージョンが、以下になっております。 > CentOS6.5(x86_64) > pacemaker(1.1.12) > corosync(2.3.4-1) > drbd(8.4.3-1) > > 2ノードでactive/sandbyにしています。 > > linux-ha.osdn.jp/wp/wp-content/uploads/OSC-Tokyo2014Fall.pdf > を参考に構築しましたが、OS起動時のサービス自動起動について質問がございます。 > > CentOS6.5で構築するにあたり、起動スクリプトはUpstart形式で設定して、 > 手動でinitctl start pacemaker.combinedをコマンド実行すると正しく起動しますが、 > OSを再起動すると自動起動しません。 > > http://linux-ha.osdn.jp/wp/archives/4051も参考にしていますが、 > 所謂/etc/init.d/形式でのchkconfig hoge onな記載ではないので、よく分かりません。 > > 試しに/etc/init.d/形式でのchkconfig corosync onとchkconfig pacemaker onでの自動起動は > うまく行きましたが、watchdogでの監視をさせたいのでUpstart方式で起動させたいです。 > > /etc/init/pacemaker.combined.conf内にstart on runlevel [2345]の記載が無いからかと > 記述して試しましたが、うまく自動起動しません。 > > 自動起動しない原因が下記confファイルから間違いがあれば、ご指摘頂ければと思います。 > よろしくお願いいたします。 > > > ---/etc/corosync/corosync.conf--- > # Please read the corosync.conf.5 manual page totem { > version: 2 > rrp_mode: active > token: 1000 > interface { > ringnumber: 0 > bindnetaddr: 192.168.220.0 > mcastaddr: 239.255.1.1 > mcastport: 5405 > } > interface { > ringnumber: 1 > bindnetaddr: 192.168.221.0 > mcastaddr: 239.255.1.1 > mcastport: 5405 > } > } > > logging { > fileline: off > to_logfile: yes > to_syslog: yes > logfile: /var/log/cluster/corosync.log > debug: off > timestamp: on > logger_subsys { > subsys: QUORUM > debug: off > } > } > > quorum { > provider: corosync_votequorum > expected_votes: 2 > } > ---/etc/corosync/corosync.conf--- > > > > corosync-keygen -lで/etc/corosync/authkeyを対向ノードにコピーしています。 > > > > ---/etc/sysconfig/pacemaker--- > > # diff -u pacemaker_default pacemaker > --- pacemaker_default 2015-08-18 17:24:18.000000000 +0900 > +++ pacemaker 2015-08-21 13:19:04.513453641 +0900 > @@ -65,7 +65,7 @@ > # PCMK_schema_directory=/some/path > > # Enable this for rebooting this machine at the time of process > (subsystem) failure -# PCMK_fail_fast=no > +export PCMK_fail_fast=yes > > #==#==# Pacemaker Remote > # Use a custom directory for finding the authkey. > > ---/etc/sysconfig/pacemaker--- > > > > > ---/etc/init/corosync.conf--- > > デフォルトのままです。 > > ---/etc/init/corosync.conf--- > > > > ---/etc/init/pacemaker.combined.conf--- > > # diff -u pacemaker.combined.conf_deafult pacemaker.combined.conf > --- pacemaker.combined.conf_deafult 2014-09-04 19:38:20.000000000 +0900 > +++ pacemaker.combined.conf 2015-08-21 16:13:56.414985467 +0900 > @@ -2,6 +2,7 @@ > # > # Starts Corosync cluster engine and Pacemaker cluster manager. > > +stop on runlevel [0123456] > kill timeout 3600 > respawn > > @@ -20,7 +21,7 @@ > pre-start script > # setup the software watchdog which corosync uses. > # rewrite according to environment. > - modprobe softdog soft_margin=60 > + [ -c /dev/watchdog ] || modprobe softdog soft_margin=6 > pidof corosync || start corosync > > # if you use corosync-notifyd, uncomment the line below. > @@ -49,7 +50,7 @@ > rm -f /var/run/$prog.pid > > # if you use watchdog of corosync, uncomment the line below. > - #pidof corosync || false > + pidof corosync || false > > pidof crmd || stop corosync > > ---/etc/init/pacemaker.combined.conf--- > > _______________________________________________ > Linux-ha-japan mailing list > Linux****@lists***** > http://lists.osdn.me/mailman/listinfo/linux-ha-japan -- ---------------------------------------- METRO SYSTEMS CO., LTD Yusuke Iida Mail: yusk.****@gmail***** ---------------------------------------- _______________________________________________ Linux-ha-japan mailing list Linux****@lists***** http://lists.osdn.me/mailman/listinfo/linux-ha-japan