
renayama19661014 at ybb
Feb 27, 2012, 6:31 PM
Views: 752
Permalink
|
和田さん こんにちは、山内です。 以下、補足いたしますね。 > 山内さん > > こんにちは。 > 和田です。 > > いつもご回答ありがとうございます。 > > > 私個人の意見ですが、単純にActive/Passive構成を考えた場合、stonithは設定するべきだと思っています。 > > > > ですので、no-quorum-policyはActive/Passiveの場合"ignore"に設定して、stonithを設定する構成です。 > > > > ただし、2ノードの場合、分断時に落としあいが発生することを回避する為に、 > > stonith-helperなどを利用することが望ましいです。 > > > > stonith-helperは、日本コミュニティのpm_extrasパッケージにあります。 > > また、場合によっては、vipcheckなども有効でしょう。 > > no-quorum-policyとstonith-helperについて十分に理解ができていないようなので > ご教示ください。 > > まず、no-quorum-policyですが、ignoreして分断が発生した場合でも > STONITHは実行されるのでしょうか? はい。Active/Passive管理しているリソースのFO動作は開始されるので stonithは実行されます。 > no-quorum-policyではSTONITHは実行されないが、monitorの間隔で実行される > などの動作をするのでしょうか? いいえ、ここはActive/Passiveそれぞれのノードから見て、相手ノードの状態が不定に なったことによって実行されるstonithになります。 monitorなどは関係ありませんが、しいて言えば、ha.cfのdeadtimeが関係します。 no-quorum-policyの設定について、補足すると。。。 ignoreの場合は、QUORUM定数の判断はしないので、処理が進みます。(ここでいうとstonithに制御が移ります) freeze,stopの場合には、まず先にQUORUM定数の判断をして、処理が進みます。 ※ただし、Active/Passiveの構成ではQUORUMは分断が発生した場合には、stonithには制御は移りません。 もし、Active/Active/Passive構成であれば、どこかで1ノードのみが離脱した場合にはQUORUMを持っている方がstonithに進んで、持っていないほうは、そのままか、リソースを停止することになります。 あくまでも、no-qourum-policyの設定は、判断が入って制御が行われるか?制御が行われないか(igonoreの場合)だけに影響しています。 > > 次にstonith-helperですが、run_standby_waitでのチェックが必要という > 理解でよろしいでしょうか? > それとも、run_standby_wait自体はnoのままでも問題ないのでしょうか? > 以前、run_standby_waitでactチェックし、NIC障害発生の確認をした際に > 両系ともPassive状態となり復旧しなかったんですよね。。。 stonith-helperの設定例を抜粋します。 primitive prmStonith1-1 stonith:external/stonith-helper \ params \ priority="1" \ stonith-timeout="40s" \ hostlist="db1" \ dead_check_target="192.168.40.170 192.168.40.170 192.168.40.170" \ standby_check_command="/usr/sbin/crm_resource -r prmExAAAAA -W | grep -q `hostname`" \ op start interval="0s" timeout="60s" \ op monitor interval="10s" timeout="60s" \ op stop interval="0s" timeout="60s" 設定のポイントは、 1)hostlist 相手ノードを指定。 2)dead_check_target 相手ノードの存在がdead(全て切れていればノードはダウン)判定できるアドレスを全て指定(この例では、サービスLANとHeartbeat用のLAN2つ) 3)standby_check_command 自ノードがリソースを持っているかどうかを判断させてActiveが優先して残るような構成では、Activeで起動するリソースを判定できるような設定をしてください。 4)その他のパラメータは基本的には設定不要だと思います(デフォルトのままでOK) stonith-helper自体は、stonithのグループとして先頭に設定してください。 必ず、次のstonithのグループには実stonithを実行するようなstonithモジュールを設定してください。(以下では、Stonith1-1がhelperで、Stonith1-2がssh, Stonith1-3がmeatwareになっています。sshのstonithが失敗した場合に、保守者介在が必要になるケースを考慮しています) group grpStonith1 \ prmStonith1-1 \ prmStonith1-2 \ prmStonith1-3 また、stonith-helper自体は、お互いのノード用にリソース構成に配置することをお忘れなく。。。。。 以上、宜しくお願いいたします。 > > よろしくお願い致します。 > > > 和田さん > > > > こんにちは、山内です。 > > > > > >> こんにちは。 > >> 和田です。 > >> > >> Active/Passive構成でのSTONITH関連の設定についてご教示ください。 > >> > >> STONITHを設定している状態で、 > >> > >> ------------------------------------------------------------------------- > >> > >> property no-quorum-policy="freeze" \ > >> stonith-enabled="true" \ > >> startup-fencing="false" \ > >> stonith-timeout="430s" > >> > >> ------------------------------------------------------------------------- > >> > >> と設定した場合、 > >> > >> ・片故障状態で、システムを起動すると正常に起動しない。 > >> ・Active側がハード故障等でダウンするとうまく切り替わらない。 > >> > >> という動作をします。 > >> > >> 以前、山内さんに教えて頂いた様に、quorum定数が半分以下になるため、切り替わらないと > >> 認識しているのですが、認識はあっているでしょうか? > > > > はい。あっています。 > > > > > >> freezeからignoreにすることで、正常に切り替わることは確認しました。 > >> #ただし、スプリットブレインなどが困りますよね。。。 > >> > >> また、一般的な設定として、みなさんは上記の事象に対応する際に、 > >> どのような設定としているのでしょうか? > >> NICを冗長化することで、Active/Passive構成ではSTONITHを利用しない > >> というような構成が一般的なのでしょうか? > > > > 私個人の意見ですが、単純にActive/Passive構成を考えた場合、stonithは設定するべきだと思っています。 > > > > ですので、no-quorum-policyはActive/Passiveの場合"ignore"に設定して、stonithを設定する構成です。 > > > > ただし、2ノードの場合、分断時に落としあいが発生することを回避する為に、 > > stonith-helperなどを利用することが望ましいです。 > > > > stonith-helperは、日本コミュニティのpm_extrasパッケージにあります。 > > また、場合によっては、vipcheckなども有効でしょう。 > > > > > > 以上、宜しくお願いいたします。 > > > > > > > > > >> > >> なお、構成は以前質問させて頂いたときと同様で、Corosync + Pacemaker + DRBDで > >> 以下の構成となっています。 > >> > >> ------------------------------------------------------------------------- > >> > >> primitive drbd_db ocf:linbit:drbd \ > >> params drbd_resource="pgsql" \ > >> op start interval="0s" timeout="240s" on-fail="restart" \ > >> op monitor interval="11s" timeout="60s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" role="Master" \ > >> op stop interval="0s" timeout="100s" on-fail="fence" > >> > >> primitive ip_db ocf:heartbeat:IPaddr2 \ > >> params ip="192.168.1.175" \ > >> nic="eth1" \ > >> cidr_netmask="24" \ > >> op start interval="0s" timeout="90s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="100s" on-fail="fence" > >> > >> primitive prmPing ocf:pacemaker:ping \ > >> params \ > >> name="ping_set" \ > >> host_list="192.168.1.1 192.168.2.1" \ > >> multiplier="100" \ > >> dampen="0" \ > >> meta \ > >> migration-threshold="3" \ > >> failure-timeout="60s" \ > >> op start interval="0s" timeout="90s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="100s" on-fail="ignore" > >> > >> primitive fs_db ocf:heartbeat:Filesystem \ > >> params device="/dev/drbd/by-res/pgsql" directory="/data" fstype="ext4" \ > >> op start interval="0s" timeout="60s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="60s" on-fail="fence" > >> > >> primitive prmPg ocf:heartbeat:pgsql \ > >> params pgctl="/usr/bin/pg_ctl" \ > >> start_opt="-p 5432" \ > >> psql="/usr/bin/psql" \ > >> pgdata="/data/" \ > >> pgdba="postgres" \ > >> pgport="5432" \ > >> pgdb="postgres" \ > >> op start interval="0s" timeout="120s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="120s" on-fail="fence" > >> > >> primitive apache ocf:heartbeat:apache \ > >> params configfile="/etc/httpd/conf/httpd.conf" \ > >> port="80" \ > >> op start interval="0s" timeout="40s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="60s" on-fail="fence" > >> > >> primitive prmDiskd ocf:pacemaker:diskd \ > >> params name="diskd_set" \ > >> device="/dev/sda1" \ > >> op start interval="0s" timeout="60s" on-fail="restart" \ > >> op monitor interval="10s" timeout="60s" on-fail="restart" \ > >> op stop interval="0s" timeout="60s" on-fail="ignore" > >> > >> primitive prmStonith1-1 stonith:external/stonith-helper \ > >> params \ > >> priority="1" \ > >> stonith-timeout="60s" \ > >> hostlist="it13" \ > >> dead_check_target="192.168.1.173" \ > >> run_standby_wait="no" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> primitive prmStonith1-2 stonith:external/ssh \ > >> params \ > >> priority="2" \ > >> stonith-timeout="60s" \ > >> hostlist="it13" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> primitive prmStonith1-3 stonith:meatware \ > >> params \ > >> priority="3" \ > >> stonith-timeout="600" \ > >> hostlist="it13" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> primitive prmStonith2-1 stonith:external/stonith-helper \ > >> params \ > >> priority="1" \ > >> stonith-timeout="60s" \ > >> hostlist="it14" \ > >> dead_check_target="192.168.1.174" \ > >> run_standby_wait="no" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> primitive prmStonith2-2 stonith:external/ssh \ > >> params \ > >> priority="2" \ > >> stonith-timeout="60s" \ > >> hostlist="it14" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> primitive prmStonith2-3 stonith:meatware \ > >> params \ > >> priority="3" \ > >> stonith-timeout="600" \ > >> hostlist="it14" \ > >> op start interval="0s" timeout="60s" \ > >> op monitor interval="3600s" timeout="60s" \ > >> op stop interval="0s" timeout="60s" > >> > >> group group_all fs_db ip_db prmPg apache > >> > >> group grpStonith1 \ > >> prmStonith1-1 \ > >> prmStonith1-2 \ > >> prmStonith1-3 > >> > >> group grpStonith2 \ > >> prmStonith2-1 \ > >> prmStonith2-2 \ > >> prmStonith2-3 > >> > >> ms ms_drbd_db drbd_db \ > >> meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true" > >> > >> clone clnPing prmPing \ > >> meta clone-max="2" clone-node-max="1" > >> > >> clone clnDiskd prmDiskd \ > >> meta clone-max="2" clone-node-max="1" > >> > >> location group_all-location group_all \ > >> rule 200: #uname eq it13 \ > >> rule 100: #uname eq it14 \ > >> rule -INFINITY: defined ping_set and ping_set lt 200 \ > >> rule -INFINITY: defined diskd_set and diskd_set eq SUCCESS > >> > >> location master-location_db ms_drbd_db \ > >> rule 200: #uname eq it13 \ > >> rule 100: #uname eq it14 \ > >> rule role=master -INFINITY: defined ping_set and ping_set lt 200 \ > >> rule role=master -INFINITY: defined diskd_set and diskd_set eq SUCCESS \ > >> rule role=master -INFINITY: defined fail-count-fs_db \ > >> rule role=master -INFINITY: defined fail-count-ip_db \ > >> rule role=master -INFINITY: defined fail-count-prmPg \ > >> rule role=master -INFINITY: defined fail-count-apache > >> > >> location rsc_location-grpStonith1-1 grpStonith1 \ > >> rule -INFINITY: #uname eq it13 > >> > >> location rsc_location-grpStonith2-1 grpStonith2 \ > >> rule -INFINITY: #uname eq it14 > >> > >> colocation db_on_drbd INFINITY: group_all ms_drbd_db:Master > >> colocation clnPing-colocation INFINITY: group_all clnPing > >> colocation clnDiskd-colocation INFINITY: group_all clnDiskd > >> order order_db_after_drbd INFINITY: ms_drbd_db:promote group_all:start > >> order order_clnPing_after_all 0: clnPing group_all symmetrical=false > >> order order_clnDiskd_after_all 0: clnDiskd group_all symmetrical=false > >> > >> property no-quorum-policy="freeze" \ > >> stonith-enabled="true" \ > >> startup-fencing="false" \ > >> stonith-timeout="430s" > >> > >> rsc_defaults resource-stickiness="INFINITY" \ > >> migration-threshold="1" > >> > >> ------------------------------------------------------------------------- > >> > >> よろしくお願い致します。 > >> > >> _______________________________________________ > >> Linux-ha-japan mailing list > >> Linux-ha-japan [at] lists > >> http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan > >> > > > > _______________________________________________ > > Linux-ha-japan mailing list > > Linux-ha-japan [at] lists > > http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan > > _______________________________________________ > Linux-ha-japan mailing list > Linux-ha-japan [at] lists > http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan > _______________________________________________ Linux-ha-japan mailing list Linux-ha-japan [at] lists http://lists.sourceforge.jp/mailman/listinfo/linux-ha-japan
|