Mailing List Archive

Re: DRBD$B$N(BMaster$B8GDj2=$K4X$7$F(B
$B$"$-$d$^$5$s(B

$B5WJ]$H$$$$$^$9!#(B

https://blog.3ware.co.jp/drbd-users-guide-8.3/s-outdate.html

DRBD$B$NDL?.$,@Z$l$?$H$-$K!"%;%+%s%@%jB&$N%G!<%?>uBV$r(BOutdated$B$H$$$&FCJL$J(B
$B>uBV$K@Z$jBX$($k$3$H$,$G$-$^$9!#(BOutdated$B$OAj<j$HDL?.$,:F3+$9$k$^$G2r=|$G(B
$B$-$:!"%m!<%k$r(BPrimary$B$K@Z$jBX$($k$3$H$b5v$5$J$$$H$$$&!"FCJL$JJ]8n>uBV$G(B
$B$9!#>e5-%Z!<%8$H$3$N%Z!<%8$+$i$N%j%s%/@h$r;29M$K!"(Boutdate-peer$B$=$NB>$rE,(B
$B@Z$K@_Dj$9$k$H$$$$$@$m$&$H;W$$$^$9!#(B

On 2015$BG/(B06$B7n(B15$BF|(B 17:29, $B$"$-$d$^$8$m$&(B wrote:
> $B$*@$OC$K$J$j$^$9!#$"$-$d$^$H?=$7$^$9!#(B
>
> DRBD$B$N(BMaster$B8GDj2=$K4X$7$F<ALd$G$9!#(B
>
> DRBD$B$N%9%W%j%C%H%V%l%$%s$,<+F0I|5l$9$k:]$N(BMaster$B$r8GDj2=$9$k$3$H$O2DG=$G(B
> $B$7$g$&$+!)(B
> $B8=:_1?MQ$7$F$$$k%^%7%s$G(BDRBD$BDL?.>c32$G%9%?%s%I%"%m%s$K$J$C$?:]$K(B
> $B%^%7%s$r:F5/F0$7$^$7$?$,!":F5/F0;~$K(BSlave$BB&$N8E$$%G!<%?$G:FF14|$5$l!"(B
> $B:G?7%G!<%?$,>C$($F$7$^$&;v>]$,H/@8$7$F$7$^$C$?$N$G!":FH/KI;_:v$H$7$F@_Dj(B
> $B$rJQ99$7$?$$$H9M$($F$$$^$9!#(B
> $BK\Mh$J$i(BDRBD$B%3%^%s%IEy$GI|5l$r;n$_$k$Y$-$J$N$G$7$g$&$,!"(B
> $B=t;v>p$"$j!">\$7$/$J$$$b$N$,FH<+$NH=CG$G:F5/F0$r<B;\$7$F$7$^$&$3$H$,$"$j!"(B
> $B$=$N$h$&$J>l9g$bK\;v>]$rH/@8$5$;$J$$$h$&$K$7$?$$$H9M$($F$$$^$9!#(B
>
> $B!Z4D6-![.(B
> Red Hat Enterprise Linux Server 6.1 (for x86)
> kernel-2.6.32-431.23.3.el6.i686
> corosync-1.4.1-17.el6_5.1.i686
> pacemaker-1.1.10-14.el6_5.3.i686
> drbd-8.3.16-1.el6.i386
>
>
> $B!Z(BPacemaker$BDj5A![.(B
> node testsv1
> node testsv2 \
> attributes standby=off
> primitive res_before_test-e lsb:before_test-e \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_drbd_quota lsb:drbd_quota \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_drbd_r0 ocf:linbit:drbd \
> params drbd_resource=r0 \
> op monitor interval=10 role=Master timeout=30 \
> op monitor interval=30 role=Slave timeout=30 \
> op start interval=0 timeout=240 \
> op stop interval=0 timeout=100
> primitive res_filesystem Filesystem \
> params device="/dev/drbd0" directory="/drbd" fstype=ext4
> options="noatime,nobarrier,usrquota" \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_nmb lsb:nmb \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_pgsql lsb:postgresql-9.0 \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_samba lsb:smb \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_vsftp lsb:vsftpd \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> group rg_filesystem res_filesystem res_drbd_quota
> group rg_samba res_samba res_nmb
> ms ms_drbd_r0 res_drbd_r0 \
> meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
> notify=true
> location l_filesystem rg_filesystem -inf: testsv2
> location l_test_drbd ms_drbd_r0 \
> rule 200: #uname eq testsv1 \
> rule 100: #uname eq testsv2
> colocation c_filesystem inf: rg_filesystem ms_drbd_r0:Master
> colocation c_test inf: res_before_test-e rg_filesystem
> colocation c_pgsql inf: res_pgsql rg_filesystem
> colocation c_samba inf: rg_samba rg_filesystem
> colocation c_vsftp inf: res_vsftp rg_filesystem
> order o_filesystem inf: ms_drbd_r0:promote rg_filesystem:start
> order o_test 0: rg_samba res_before_test-e:start
> order o_pgsql inf: rg_filesystem res_pgsql:start
> order o_samba 0: res_vsftp rg_samba:start
> order o_vsftp 0: res_pgsql res_vsftp:start
> property cib-bootstrap-options: \
> stonith-enabled=false \
> no-quorum-policy=ignore \
> default-resource-stickiness=200 \
> dc-version=1.1.10-14.el6_5.3-368c726 \
> cluster-infrastructure="classic openais (with plugin)" \
> expected-quorum-votes=2
>
> $B!Z(BDRBD$BDj5A![.(B
> global {
> #usage-count yes;
> usage-count no;
> # minor-count dialog-refresh disable-ip-verification
> }
>
> common {
> #protocol C;
>
> handlers {
> # These are EXAMPLE handlers only.
> # They may have severe implications,
> # like hard resetting the node under certain circumstances.
> # Be careful when chosing your poison.
>
> # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
> # split-brain "/usr/lib/drbd/notify-split-brain.sh root";
> # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
> # before-resync-target
> "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
> # after-resync-target
> /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
> }
>
> startup {
> # wfc-timeout degr-wfc-timeout outdated-wfc-timeout
> wait-after-sb
> }
>
> disk {
> # on-io-error fencing use-bmbv no-disk-barrier
> no-disk-flushes
> # no-disk-drain no-md-flushes max-bio-bvecs
> no-disk-barrier;
> no-disk-flushes;
> }
>
> net {
> # sndbuf-size rcvbuf-size timeout connect-int ping-int
> ping-timeout max-buffers
> # max-epoch-size ko-count allow-two-primaries
> cram-hmac-alg shared-secret
> # after-sb-0pri after-sb-1pri after-sb-2pri
> data-integrity-alg no-tcp-cork
> max-buffers 8000;
> max-epoch-size 8000;
> after-sb-0pri discard-younger-primary;
> after-sb-1pri discard-secondary;
> after-sb-2pri disconnect;
> }
>
> syncer {
> # rate after al-extents use-rle cpu-mask verify-alg
> csums-alg
> rate 30M;
> verify-alg sha1;
> }
> }
>
>
>
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>

--
----------------------------------------------------------------------
$B5WJ](B $B85<#(B ($B3t(B)$B%5!<%I%&%'%"(B
Motoharu Kubo 135-0034 $BEl5~ETKOED6hN>9q(B2-16-5 $B$"$D$^%S%k(B5F
mkubo@3ware.co.jp URL: http://www.3ware.co.jp/
Phone: 03-4530-8670 03-4530-0521 ($BFb@~(B201)
Fax: 03-6240-2420
$B7HBS(B: 090-6171-5545

_______________________________________________
Linux-ha-japan mailing list
Linux-ha-japan@lists.osdn.me
http://lists.osdn.me/mailman/listinfo/linux-ha-japan
Re: DRBD$B$N(BMaster$B8GDj2=$K4X$7$F(B [ In reply to ]
$B$"$-$d$^$5$s(B

$B5WJ]$H$$$$$^$9!#(B

https://blog.3ware.co.jp/drbd-users-guide-8.3/s-outdate.html

DRBD$B$NDL?.$,@Z$l$?$H$-$K!"%;%+%s%@%jB&$N%G!<%?>uBV$r(BOutdated$B$H$$$&FCJL$J(B
$B>uBV$K@Z$jBX$($k$3$H$,$G$-$^$9!#(BOutdated$B$OAj<j$HDL?.$,:F3+$9$k$^$G2r=|$G(B
$B$-$:!"%m!<%k$r(BPrimary$B$K@Z$jBX$($k$3$H$b5v$5$J$$$H$$$&!"FCJL$JJ]8n>uBV$G(B
$B$9!#>e5-%Z!<%8$H$3$N%Z!<%8$+$i$N%j%s%/@h$r;29M$K!"(Boutdate-peer$B$=$NB>$rE,(B
$B@Z$K@_Dj$9$k$H$$$$$@$m$&$H;W$$$^$9!#(B

On 2015$BG/(B06$B7n(B15$BF|(B 17:29, $B$"$-$d$^$8$m$&(B wrote:
> $B$*@$OC$K$J$j$^$9!#$"$-$d$^$H?=$7$^$9!#(B
>
> DRBD$B$N(BMaster$B8GDj2=$K4X$7$F<ALd$G$9!#(B
>
> DRBD$B$N%9%W%j%C%H%V%l%$%s$,<+F0I|5l$9$k:]$N(BMaster$B$r8GDj2=$9$k$3$H$O2DG=$G(B
> $B$7$g$&$+!)(B
> $B8=:_1?MQ$7$F$$$k%^%7%s$G(BDRBD$BDL?.>c32$G%9%?%s%I%"%m%s$K$J$C$?:]$K(B
> $B%^%7%s$r:F5/F0$7$^$7$?$,!":F5/F0;~$K(BSlave$BB&$N8E$$%G!<%?$G:FF14|$5$l!"(B
> $B:G?7%G!<%?$,>C$($F$7$^$&;v>]$,H/@8$7$F$7$^$C$?$N$G!":FH/KI;_:v$H$7$F@_Dj(B
> $B$rJQ99$7$?$$$H9M$($F$$$^$9!#(B
> $BK\Mh$J$i(BDRBD$B%3%^%s%IEy$GI|5l$r;n$_$k$Y$-$J$N$G$7$g$&$,!"(B
> $B=t;v>p$"$j!">\$7$/$J$$$b$N$,FH<+$NH=CG$G:F5/F0$r<B;\$7$F$7$^$&$3$H$,$"$j!"(B
> $B$=$N$h$&$J>l9g$bK\;v>]$rH/@8$5$;$J$$$h$&$K$7$?$$$H9M$($F$$$^$9!#(B
>
> $B!Z4D6-![.(B
> Red Hat Enterprise Linux Server 6.1 (for x86)
> kernel-2.6.32-431.23.3.el6.i686
> corosync-1.4.1-17.el6_5.1.i686
> pacemaker-1.1.10-14.el6_5.3.i686
> drbd-8.3.16-1.el6.i386
>
>
> $B!Z(BPacemaker$BDj5A![.(B
> node testsv1
> node testsv2 \
> attributes standby=off
> primitive res_before_test-e lsb:before_test-e \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_drbd_quota lsb:drbd_quota \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_drbd_r0 ocf:linbit:drbd \
> params drbd_resource=r0 \
> op monitor interval=10 role=Master timeout=30 \
> op monitor interval=30 role=Slave timeout=30 \
> op start interval=0 timeout=240 \
> op stop interval=0 timeout=100
> primitive res_filesystem Filesystem \
> params device="/dev/drbd0" directory="/drbd" fstype=ext4
> options="noatime,nobarrier,usrquota" \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_nmb lsb:nmb \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_pgsql lsb:postgresql-9.0 \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_samba lsb:smb \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> primitive res_vsftp lsb:vsftpd \
> op monitor interval=30 timeout=30 \
> op start interval=0 timeout=60 \
> op stop interval=0 timeout=60
> group rg_filesystem res_filesystem res_drbd_quota
> group rg_samba res_samba res_nmb
> ms ms_drbd_r0 res_drbd_r0 \
> meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
> notify=true
> location l_filesystem rg_filesystem -inf: testsv2
> location l_test_drbd ms_drbd_r0 \
> rule 200: #uname eq testsv1 \
> rule 100: #uname eq testsv2
> colocation c_filesystem inf: rg_filesystem ms_drbd_r0:Master
> colocation c_test inf: res_before_test-e rg_filesystem
> colocation c_pgsql inf: res_pgsql rg_filesystem
> colocation c_samba inf: rg_samba rg_filesystem
> colocation c_vsftp inf: res_vsftp rg_filesystem
> order o_filesystem inf: ms_drbd_r0:promote rg_filesystem:start
> order o_test 0: rg_samba res_before_test-e:start
> order o_pgsql inf: rg_filesystem res_pgsql:start
> order o_samba 0: res_vsftp rg_samba:start
> order o_vsftp 0: res_pgsql res_vsftp:start
> property cib-bootstrap-options: \
> stonith-enabled=false \
> no-quorum-policy=ignore \
> default-resource-stickiness=200 \
> dc-version=1.1.10-14.el6_5.3-368c726 \
> cluster-infrastructure="classic openais (with plugin)" \
> expected-quorum-votes=2
>
> $B!Z(BDRBD$BDj5A![.(B
> global {
> #usage-count yes;
> usage-count no;
> # minor-count dialog-refresh disable-ip-verification
> }
>
> common {
> #protocol C;
>
> handlers {
> # These are EXAMPLE handlers only.
> # They may have severe implications,
> # like hard resetting the node under certain circumstances.
> # Be careful when chosing your poison.
>
> # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
> # split-brain "/usr/lib/drbd/notify-split-brain.sh root";
> # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
> # before-resync-target
> "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
> # after-resync-target
> /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
> }
>
> startup {
> # wfc-timeout degr-wfc-timeout outdated-wfc-timeout
> wait-after-sb
> }
>
> disk {
> # on-io-error fencing use-bmbv no-disk-barrier
> no-disk-flushes
> # no-disk-drain no-md-flushes max-bio-bvecs
> no-disk-barrier;
> no-disk-flushes;
> }
>
> net {
> # sndbuf-size rcvbuf-size timeout connect-int ping-int
> ping-timeout max-buffers
> # max-epoch-size ko-count allow-two-primaries
> cram-hmac-alg shared-secret
> # after-sb-0pri after-sb-1pri after-sb-2pri
> data-integrity-alg no-tcp-cork
> max-buffers 8000;
> max-epoch-size 8000;
> after-sb-0pri discard-younger-primary;
> after-sb-1pri discard-secondary;
> after-sb-2pri disconnect;
> }
>
> syncer {
> # rate after al-extents use-rle cpu-mask verify-alg
> csums-alg
> rate 30M;
> verify-alg sha1;
> }
> }
>
>
>
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>

--
----------------------------------------------------------------------
$B5WJ](B $B85<#(B ($B3t(B)$B%5!<%I%&%'%"(B
Motoharu Kubo 135-0034 $BEl5~ETKOED6hN>9q(B2-16-5 $B$"$D$^%S%k(B5F
mkubo@3ware.co.jp URL: http://www.3ware.co.jp/
Phone: 03-4530-8670 03-4530-0521 ($BFb@~(B201)
Fax: 03-6240-2420
$B7HBS(B: 090-6171-5545

_______________________________________________
Linux-ha-japan mailing list
Linux-ha-japan@lists.osdn.me
http://lists.osdn.me/mailman/listinfo/linux-ha-japan
Re: DRBDのMaster固定化に関して [ In reply to ]
久保さん

あきやまです。回答ありがとうございます。

回答いただいた内容で導入可否の検討をしたいと思います。
リンク先を参照したところ、Heartbeatでの設定方法に関しての記述はありましたが、
Corosyncでの設定も可能でしょうか?
参考になるサイト等あれば、ご教授いただけると助かります。

以上、よろしくお願いします。



2015-06-15 21:38 GMT+09:00 Motoharu Kubo <mkubo@3ware.co.jp>:

> あきやまさん
>
> 久保といいます。
>
> https://blog.3ware.co.jp/drbd-users-guide-8.3/s-outdate.html
>
> DRBDの通信が切れたときに、セカンダリ側のデータ状態をOutdatedという特別な
> 状態に切り替えることができます。Outdatedは相手と通信が再開するまで解除で
> きず、ロールをPrimaryに切り替えることも許さないという、特別な保護状態で
> す。上記ページとこのページからのリンク先を参考に、outdate-peerその他を適
> 切に設定するといいだろうと思います。
>
> On 2015年06月15日 17:29, あきやまじろう wrote:
> > お世話になります。あきやまと申します。
> >
> > DRBDのMaster固定化に関して質問です。
> >
> > DRBDのスプリットブレインが自動復旧する際のMasterを固定化することは可能で
> > しょうか?
> > 現在運用しているマシンでDRBD通信障害でスタンドアロンになった際に
> > マシンを再起動しましたが、再起動時にSlave側の古いデータで再同期され、
> > 最新データが消えてしまう事象が発生してしまったので、再発防止策として設定
> > を変更したいと考えています。
> > 本来ならDRBDコマンド等で復旧を試みるべきなのでしょうが、
> > 諸事情あり、詳しくないものが独自の判断で再起動を実施してしまうことがあり、
> > そのような場合も本事象を発生させないようにしたいと考えています。
> >
> > 【環境】
> > Red Hat Enterprise Linux Server 6.1 (for x86)
> > kernel-2.6.32-431.23.3.el6.i686
> > corosync-1.4.1-17.el6_5.1.i686
> > pacemaker-1.1.10-14.el6_5.3.i686
> > drbd-8.3.16-1.el6.i386
> >
> >
> > 【Pacemaker定義】
> > node testsv1
> > node testsv2 \
> > attributes standby=off
> > primitive res_before_test-e lsb:before_test-e \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_drbd_quota lsb:drbd_quota \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_drbd_r0 ocf:linbit:drbd \
> > params drbd_resource=r0 \
> > op monitor interval=10 role=Master timeout=30 \
> > op monitor interval=30 role=Slave timeout=30 \
> > op start interval=0 timeout=240 \
> > op stop interval=0 timeout=100
> > primitive res_filesystem Filesystem \
> > params device="/dev/drbd0" directory="/drbd" fstype=ext4
> > options="noatime,nobarrier,usrquota" \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_nmb lsb:nmb \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_pgsql lsb:postgresql-9.0 \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_samba lsb:smb \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_vsftp lsb:vsftpd \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > group rg_filesystem res_filesystem res_drbd_quota
> > group rg_samba res_samba res_nmb
> > ms ms_drbd_r0 res_drbd_r0 \
> > meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1
> > notify=true
> > location l_filesystem rg_filesystem -inf: testsv2
> > location l_test_drbd ms_drbd_r0 \
> > rule 200: #uname eq testsv1 \
> > rule 100: #uname eq testsv2
> > colocation c_filesystem inf: rg_filesystem ms_drbd_r0:Master
> > colocation c_test inf: res_before_test-e rg_filesystem
> > colocation c_pgsql inf: res_pgsql rg_filesystem
> > colocation c_samba inf: rg_samba rg_filesystem
> > colocation c_vsftp inf: res_vsftp rg_filesystem
> > order o_filesystem inf: ms_drbd_r0:promote rg_filesystem:start
> > order o_test 0: rg_samba res_before_test-e:start
> > order o_pgsql inf: rg_filesystem res_pgsql:start
> > order o_samba 0: res_vsftp rg_samba:start
> > order o_vsftp 0: res_pgsql res_vsftp:start
> > property cib-bootstrap-options: \
> > stonith-enabled=false \
> > no-quorum-policy=ignore \
> > default-resource-stickiness=200 \
> > dc-version=1.1.10-14.el6_5.3-368c726 \
> > cluster-infrastructure="classic openais (with plugin)" \
> > expected-quorum-votes=2
> >
> > 【DRBD定義】
> > global {
> > #usage-count yes;
> > usage-count no;
> > # minor-count dialog-refresh disable-ip-verification
> > }
> >
> > common {
> > #protocol C;
> >
> > handlers {
> > # These are EXAMPLE handlers only.
> > # They may have severe implications,
> > # like hard resetting the node under certain
> circumstances.
> > # Be careful when chosing your poison.
> >
> > # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
> > # split-brain "/usr/lib/drbd/notify-split-brain.sh root";
> > # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
> > # before-resync-target
> > "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
> > # after-resync-target
> > /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
> > }
> >
> > startup {
> > # wfc-timeout degr-wfc-timeout outdated-wfc-timeout
> > wait-after-sb
> > }
> >
> > disk {
> > # on-io-error fencing use-bmbv no-disk-barrier
> > no-disk-flushes
> > # no-disk-drain no-md-flushes max-bio-bvecs
> > no-disk-barrier;
> > no-disk-flushes;
> > }
> >
> > net {
> > # sndbuf-size rcvbuf-size timeout connect-int ping-int
> > ping-timeout max-buffers
> > # max-epoch-size ko-count allow-two-primaries
> > cram-hmac-alg shared-secret
> > # after-sb-0pri after-sb-1pri after-sb-2pri
> > data-integrity-alg no-tcp-cork
> > max-buffers 8000;
> > max-epoch-size 8000;
> > after-sb-0pri discard-younger-primary;
> > after-sb-1pri discard-secondary;
> > after-sb-2pri disconnect;
> > }
> >
> > syncer {
> > # rate after al-extents use-rle cpu-mask verify-alg
> > csums-alg
> > rate 30M;
> > verify-alg sha1;
> > }
> > }
> >
> >
> >
> >
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux-ha-japan@lists.osdn.me
> > http://lists.osdn.me/mailman/listinfo/linux-ha-japan
> >
>
> --
> ----------------------------------------------------------------------
> 久保 元治 (株)サードウェア
> Motoharu Kubo 135-0034 東京都墨田区両国2-16-5 あつまビル5F
> mkubo@3ware.co.jp URL: http://www.3ware.co.jp/
> Phone: 03-4530-8670 03-4530-0521 (内線201)
> Fax: 03-6240-2420
> 携帯: 090-6171-5545
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>
Re: DRBD$B$N(BMaster$B8GDj2=$K4X$7$F(B [ In reply to ]
$B5WJ]$G$9!#(B

$B$?$7$+$K>R2p$7$?%Z!<%8$+$i$N%j%s%/@h$J$I$N>pJs$O(Bheartbeat$B$H$NJ;MQA0Ds$N(B
$BFbMF$G$9$M!#(B

Heartbeat+Pacemaker$B!"(BCorosync+Pacemaker$B$N$I$A$i$G$b;H$($kJ}K!$O(B

https://blog.3ware.co.jp/drbd-users-guide-8.3/s-pacemaker-fencing.html

$B$,;29M$K$J$k$H;W$$$^$9!#(B

$B$?$@$7!"(Bcorosync$B$NDL?.7PO)(B(ring)$B$rJ#?t@_$1$F$$$J$$$H!"$3$NJ}K!$O$&$^$/F0(B
$B$+$J$$$O$:$G$9!#$4Cm0U$/$@$5$$!#(B

On 2015$BG/(B06$B7n(B16$BF|(B 11:14, $B$"$-$d$^$8$m$&(B wrote:
> $B5WJ]$5$s(B
>
> $B$"$-$d$^$G$9!#2sEz$"$j$,$H$&$4$6$$$^$9!#(B
>
> $B2sEz$$$?$@$$$?FbMF$GF3F~2DH]$N8!F$$r$7$?$$$H;W$$$^$9!#(B
> $B%j%s%/@h$r;2>H$7$?$H$3$m!"(BHeartbeat$B$G$N@_DjJ}K!$K4X$7$F$N5-=R$O$"$j$^$7(B
> $B$?$,!"(B
> Corosync$B$G$N@_Dj$b2DG=$G$7$g$&$+!)(B
> $B;29M$K$J$k%5%$%HEy$"$l$P!"$465<x$$$?$@$1$k$H=u$+$j$^$9!#(B
>
> $B0J>e!"$h$m$7$/$*4j$$$7$^$9!#(B
>
>
>
> 2015-06-15 21:38 GMT+09:00 Motoharu Kubo <mkubo@3ware.co.jp
> <mailto:mkubo@3ware.co.jp>>:
>
> $B$"$-$d$^$5$s(B
>
> $B5WJ]$H$$$$$^$9!#(B
>
> https://blog.3ware.co.jp/drbd-users-guide-8.3/s-outdate.html
>
> DRBD$B$NDL?.$,@Z$l$?$H$-$K!"%;%+%s%@%jB&$N%G!<%?>uBV$r(BOutdated$B$H$$$&FCJL$J(B
> $B>uBV$K@Z$jBX$($k$3$H$,$G$-$^$9!#(BOutdated$B$OAj<j$HDL?.$,:F3+$9$k$^$G2r=|$G(B
> $B$-$:!"%m!<%k$r(BPrimary$B$K@Z$jBX$($k$3$H$b5v$5$J$$$H$$$&!"FCJL$JJ]8n>uBV$G(B
> $B$9!#>e5-%Z!<%8$H$3$N%Z!<%8$+$i$N%j%s%/@h$r;29M$K!"(Boutdate-peer$B$=$NB>$rE,(B
> $B@Z$K@_Dj$9$k$H$$$$$@$m$&$H;W$$$^$9!#(B
>
> On 2015$BG/(B06$B7n(B15$BF|(B 17:29, $B$"$-$d$^$8$m$&(B wrote:
> > $B$*@$OC$K$J$j$^$9!#$"$-$d$^$H?=$7$^$9!#(B
> >
> > DRBD$B$N(BMaster$B8GDj2=$K4X$7$F<ALd$G$9!#(B
> >
> > DRBD$B$N%9%W%j%C%H%V%l%$%s$,<+F0I|5l$9$k:]$N(BMaster$B$r8GDj2=$9$k$3$H$O(B
> $B2DG=$G(B
> > $B$7$g$&$+!)(B
> > $B8=:_1?MQ$7$F$$$k%^%7%s$G(BDRBD$BDL?.>c32$G%9%?%s%I%"%m%s$K$J$C$?:]$K(B
> > $B%^%7%s$r:F5/F0$7$^$7$?$,!":F5/F0;~$K(BSlave$BB&$N8E$$%G!<%?$G:FF14|$5$l!"(B
> > $B:G?7%G!<%?$,>C$($F$7$^$&;v>]$,H/@8$7$F$7$^$C$?$N$G!":FH/KI;_:v$H$7(B
> $B$F@_Dj(B
> > $B$rJQ99$7$?$$$H9M$($F$$$^$9!#(B
> > $BK\Mh$J$i(BDRBD$B%3%^%s%IEy$GI|5l$r;n$_$k$Y$-$J$N$G$7$g$&$,!"(B
> > $B=t;v>p$"$j!">\$7$/$J$$$b$N$,FH<+$NH=CG$G:F5/F0$r<B;\$7$F$7$^$&$3$H(B
> $B$,$"$j!"(B
> > $B$=$N$h$&$J>l9g$bK\;v>]$rH/@8$5$;$J$$$h$&$K$7$?$$$H9M$($F$$$^$9!#(B
> >
> > $B!Z4D6-![.(B
> > Red Hat Enterprise Linux Server 6.1 (for x86)
> > kernel-2.6.32-431.23.3.el6.i686
> > corosync-1.4.1-17.el6_5.1.i686
> > pacemaker-1.1.10-14.el6_5.3.i686
> > drbd-8.3.16-1.el6.i386
> >
> >
> > $B!Z(BPacemaker$BDj5A![.(B
> > node testsv1
> > node testsv2 \
> > attributes standby=off
> > primitive res_before_test-e lsb:before_test-e \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_drbd_quota lsb:drbd_quota \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_drbd_r0 ocf:linbit:drbd \
> > params drbd_resource=r0 \
> > op monitor interval=10 role=Master timeout=30 \
> > op monitor interval=30 role=Slave timeout=30 \
> > op start interval=0 timeout=240 \
> > op stop interval=0 timeout=100
> > primitive res_filesystem Filesystem \
> > params device="/dev/drbd0" directory="/drbd" fstype=ext4
> > options="noatime,nobarrier,usrquota" \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_nmb lsb:nmb \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_pgsql lsb:postgresql-9.0 \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_samba lsb:smb \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > primitive res_vsftp lsb:vsftpd \
> > op monitor interval=30 timeout=30 \
> > op start interval=0 timeout=60 \
> > op stop interval=0 timeout=60
> > group rg_filesystem res_filesystem res_drbd_quota
> > group rg_samba res_samba res_nmb
> > ms ms_drbd_r0 res_drbd_r0 \
> > meta master-max=1 master-node-max=1 clone-max=2
> clone-node-max=1
> > notify=true
> > location l_filesystem rg_filesystem -inf: testsv2
> > location l_test_drbd ms_drbd_r0 \
> > rule 200: #uname eq testsv1 \
> > rule 100: #uname eq testsv2
> > colocation c_filesystem inf: rg_filesystem ms_drbd_r0:Master
> > colocation c_test inf: res_before_test-e rg_filesystem
> > colocation c_pgsql inf: res_pgsql rg_filesystem
> > colocation c_samba inf: rg_samba rg_filesystem
> > colocation c_vsftp inf: res_vsftp rg_filesystem
> > order o_filesystem inf: ms_drbd_r0:promote rg_filesystem:start
> > order o_test 0: rg_samba res_before_test-e:start
> > order o_pgsql inf: rg_filesystem res_pgsql:start
> > order o_samba 0: res_vsftp rg_samba:start
> > order o_vsftp 0: res_pgsql res_vsftp:start
> > property cib-bootstrap-options: \
> > stonith-enabled=false \
> > no-quorum-policy=ignore \
> > default-resource-stickiness=200 \
> > dc-version=1.1.10-14.el6_5.3-368c726 \
> > cluster-infrastructure="classic openais (with plugin)" \
> > expected-quorum-votes=2
> >
> > $B!Z(BDRBD$BDj5A![.(B
> > global {
> > #usage-count yes;
> > usage-count no;
> > # minor-count dialog-refresh disable-ip-verification
> > }
> >
> > common {
> > #protocol C;
> >
> > handlers {
> > # These are EXAMPLE handlers only.
> > # They may have severe implications,
> > # like hard resetting the node under certain
> circumstances.
> > # Be careful when chosing your poison.
> >
> > # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
> > # split-brain "/usr/lib/drbd/notify-split-brain.sh
> root";
> > # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh
> root";
> > # before-resync-target
> > "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
> > # after-resync-target
> > /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
> > }
> >
> > startup {
> > # wfc-timeout degr-wfc-timeout outdated-wfc-timeout
> > wait-after-sb
> > }
> >
> > disk {
> > # on-io-error fencing use-bmbv no-disk-barrier
> > no-disk-flushes
> > # no-disk-drain no-md-flushes max-bio-bvecs
> > no-disk-barrier;
> > no-disk-flushes;
> > }
> >
> > net {
> > # sndbuf-size rcvbuf-size timeout connect-int ping-int
> > ping-timeout max-buffers
> > # max-epoch-size ko-count allow-two-primaries
> > cram-hmac-alg shared-secret
> > # after-sb-0pri after-sb-1pri after-sb-2pri
> > data-integrity-alg no-tcp-cork
> > max-buffers 8000;
> > max-epoch-size 8000;
> > after-sb-0pri discard-younger-primary;
> > after-sb-1pri discard-secondary;
> > after-sb-2pri disconnect;
> > }
> >
> > syncer {
> > # rate after al-extents use-rle cpu-mask verify-alg
> > csums-alg
> > rate 30M;
> > verify-alg sha1;
> > }
> > }
> >
> >
> >
> >
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux-ha-japan@lists.osdn.me <mailto:Linux-ha-japan@lists.osdn.me>
> > http://lists.osdn.me/mailman/listinfo/linux-ha-japan
> >
>
> --
> ----------------------------------------------------------------------
> $B5WJ](B $B85<#(B ($B3t(B)$B%5!<%I%&%'%"(B
> Motoharu Kubo 135-0034 $BEl5~ETKOED6hN>9q(B2-16-5 $B$"$D$^%S%k(B5F
> mkubo@3ware.co.jp <mailto:mkubo@3ware.co.jp> URL:
> http://www.3ware.co.jp/
> Phone: 03-4530-8670 03-4530-0521 ($BFb@~(B201)
> Fax: 03-6240-2420
> $B7HBS(B: 090-6171-5545
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me <mailto:Linux-ha-japan@lists.osdn.me>
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>
>
>
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>

--
----------------------------------------------------------------------
$B5WJ](B $B85<#(B ($B3t(B)$B%5!<%I%&%'%"(B
Motoharu Kubo 135-0034 $BEl5~ETKOED6hN>9q(B2-16-5 $B$"$D$^%S%k(B5F
mkubo@3ware.co.jp URL: http://www.3ware.co.jp/
Phone: 03-4530-8670 03-4530-0521 ($BFb@~(B201)
Fax: 03-6240-2420
$B7HBS(B: 090-6171-5545

_______________________________________________
Linux-ha-japan mailing list
Linux-ha-japan@lists.osdn.me
http://lists.osdn.me/mailman/listinfo/linux-ha-japan
Re: DRBDのMaster固定化に関して [ In reply to ]
あきやまです。

早速の回答ありがとうございます。

回答いただいた内容でまずは検証を実施してみたいと思います。

以上です。


2015年6月16日 13:21 Motoharu Kubo <mkubo@3ware.co.jp>:

> 久保です。
>
> たしかに紹介したページからのリンク先などの情報はheartbeatとの併用前提の
> 内容ですね。
>
> Heartbeat+Pacemaker、Corosync+Pacemakerのどちらでも使える方法は
>
> https://blog.3ware.co.jp/drbd-users-guide-8.3/s-pacemaker-fencing.html
>
> が参考になると思います。
>
> ただし、corosyncの通信経路(ring)を複数設けていないと、この方法はうまく動
> かないはずです。ご注意ください。
>
> On 2015年06月16日 11:14, あきやまじろう wrote:
> > 久保さん
> >
> > あきやまです。回答ありがとうございます。
> >
> > 回答いただいた内容で導入可否の検討をしたいと思います。
> > リンク先を参照したところ、Heartbeatでの設定方法に関しての記述はありまし
> > たが、
> > Corosyncでの設定も可能でしょうか?
> > 参考になるサイト等あれば、ご教授いただけると助かります。
> >
> > 以上、よろしくお願いします。
> >
> >
> >
> > 2015-06-15 21:38 GMT+09:00 Motoharu Kubo <mkubo@3ware.co.jp
> > <mailto:mkubo@3ware.co.jp>>:
> >
> > あきやまさん
> >
> > 久保といいます。
> >
> > https://blog.3ware.co.jp/drbd-users-guide-8.3/s-outdate.html
> >
> > DRBDの通信が切れたときに、セカンダリ側のデータ状態をOutdatedという特別な
> > 状態に切り替えることができます。Outdatedは相手と通信が再開するまで解除で
> > きず、ロールをPrimaryに切り替えることも許さないという、特別な保護状態で
> > す。上記ページとこのページからのリンク先を参考に、outdate-peerその他を適
> > 切に設定するといいだろうと思います。
> >
> > On 2015年06月15日 17:29, あきやまじろう wrote:
> > > お世話になります。あきやまと申します。
> > >
> > > DRBDのMaster固定化に関して質問です。
> > >
> > > DRBDのスプリットブレインが自動復旧する際のMasterを固定化することは
> > 可能で
> > > しょうか?
> > > 現在運用しているマシンでDRBD通信障害でスタンドアロンになった際に
> > > マシンを再起動しましたが、再起動時にSlave側の古いデータで再同期され、
> > > 最新データが消えてしまう事象が発生してしまったので、再発防止策とし
> > て設定
> > > を変更したいと考えています。
> > > 本来ならDRBDコマンド等で復旧を試みるべきなのでしょうが、
> > > 諸事情あり、詳しくないものが独自の判断で再起動を実施してしまうこと
> > があり、
> > > そのような場合も本事象を発生させないようにしたいと考えています。
> > >
> > > 【環境】
> > > Red Hat Enterprise Linux Server 6.1 (for x86)
> > > kernel-2.6.32-431.23.3.el6.i686
> > > corosync-1.4.1-17.el6_5.1.i686
> > > pacemaker-1.1.10-14.el6_5.3.i686
> > > drbd-8.3.16-1.el6.i386
> > >
> > >
> > > 【Pacemaker定義】
> > > node testsv1
> > > node testsv2 \
> > > attributes standby=off
> > > primitive res_before_test-e lsb:before_test-e \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_drbd_quota lsb:drbd_quota \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_drbd_r0 ocf:linbit:drbd \
> > > params drbd_resource=r0 \
> > > op monitor interval=10 role=Master timeout=30 \
> > > op monitor interval=30 role=Slave timeout=30 \
> > > op start interval=0 timeout=240 \
> > > op stop interval=0 timeout=100
> > > primitive res_filesystem Filesystem \
> > > params device="/dev/drbd0" directory="/drbd" fstype=ext4
> > > options="noatime,nobarrier,usrquota" \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_nmb lsb:nmb \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_pgsql lsb:postgresql-9.0 \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_samba lsb:smb \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > primitive res_vsftp lsb:vsftpd \
> > > op monitor interval=30 timeout=30 \
> > > op start interval=0 timeout=60 \
> > > op stop interval=0 timeout=60
> > > group rg_filesystem res_filesystem res_drbd_quota
> > > group rg_samba res_samba res_nmb
> > > ms ms_drbd_r0 res_drbd_r0 \
> > > meta master-max=1 master-node-max=1 clone-max=2
> > clone-node-max=1
> > > notify=true
> > > location l_filesystem rg_filesystem -inf: testsv2
> > > location l_test_drbd ms_drbd_r0 \
> > > rule 200: #uname eq testsv1 \
> > > rule 100: #uname eq testsv2
> > > colocation c_filesystem inf: rg_filesystem ms_drbd_r0:Master
> > > colocation c_test inf: res_before_test-e rg_filesystem
> > > colocation c_pgsql inf: res_pgsql rg_filesystem
> > > colocation c_samba inf: rg_samba rg_filesystem
> > > colocation c_vsftp inf: res_vsftp rg_filesystem
> > > order o_filesystem inf: ms_drbd_r0:promote rg_filesystem:start
> > > order o_test 0: rg_samba res_before_test-e:start
> > > order o_pgsql inf: rg_filesystem res_pgsql:start
> > > order o_samba 0: res_vsftp rg_samba:start
> > > order o_vsftp 0: res_pgsql res_vsftp:start
> > > property cib-bootstrap-options: \
> > > stonith-enabled=false \
> > > no-quorum-policy=ignore \
> > > default-resource-stickiness=200 \
> > > dc-version=1.1.10-14.el6_5.3-368c726 \
> > > cluster-infrastructure="classic openais (with plugin)" \
> > > expected-quorum-votes=2
> > >
> > > 【DRBD定義】
> > > global {
> > > #usage-count yes;
> > > usage-count no;
> > > # minor-count dialog-refresh disable-ip-verification
> > > }
> > >
> > > common {
> > > #protocol C;
> > >
> > > handlers {
> > > # These are EXAMPLE handlers only.
> > > # They may have severe implications,
> > > # like hard resetting the node under certain
> > circumstances.
> > > # Be careful when chosing your poison.
> > >
> > > # fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
> > > # split-brain "/usr/lib/drbd/notify-split-brain.sh
> > root";
> > > # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh
> > root";
> > > # before-resync-target
> > > "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k";
> > > # after-resync-target
> > > /usr/lib/drbd/unsnapshot-resync-target-lvm.sh;
> > > }
> > >
> > > startup {
> > > # wfc-timeout degr-wfc-timeout outdated-wfc-timeout
> > > wait-after-sb
> > > }
> > >
> > > disk {
> > > # on-io-error fencing use-bmbv no-disk-barrier
> > > no-disk-flushes
> > > # no-disk-drain no-md-flushes max-bio-bvecs
> > > no-disk-barrier;
> > > no-disk-flushes;
> > > }
> > >
> > > net {
> > > # sndbuf-size rcvbuf-size timeout connect-int
> ping-int
> > > ping-timeout max-buffers
> > > # max-epoch-size ko-count allow-two-primaries
> > > cram-hmac-alg shared-secret
> > > # after-sb-0pri after-sb-1pri after-sb-2pri
> > > data-integrity-alg no-tcp-cork
> > > max-buffers 8000;
> > > max-epoch-size 8000;
> > > after-sb-0pri discard-younger-primary;
> > > after-sb-1pri discard-secondary;
> > > after-sb-2pri disconnect;
> > > }
> > >
> > > syncer {
> > > # rate after al-extents use-rle cpu-mask verify-alg
> > > csums-alg
> > > rate 30M;
> > > verify-alg sha1;
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Linux-ha-japan mailing list
> > > Linux-ha-japan@lists.osdn.me <mailto:Linux-ha-japan@lists.osdn.me>
> > > http://lists.osdn.me/mailman/listinfo/linux-ha-japan
> > >
> >
> > --
> >
> ----------------------------------------------------------------------
> > 久保 元治 (株)サードウェア
> > Motoharu Kubo 135-0034 東京都墨田区両国2-16-5 あつまビル5F
> > mkubo@3ware.co.jp <mailto:mkubo@3ware.co.jp> URL:
> > http://www.3ware.co.jp/
> > Phone: 03-4530-8670 03-4530-0521 (内線201)
> > Fax: 03-6240-2420
> > 携帯: 090-6171-5545
> >
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux-ha-japan@lists.osdn.me <mailto:Linux-ha-japan@lists.osdn.me>
> > http://lists.osdn.me/mailman/listinfo/linux-ha-japan
> >
> >
> >
> >
> > _______________________________________________
> > Linux-ha-japan mailing list
> > Linux-ha-japan@lists.osdn.me
> > http://lists.osdn.me/mailman/listinfo/linux-ha-japan
> >
>
> --
> ----------------------------------------------------------------------
> 久保 元治 (株)サードウェア
> Motoharu Kubo 135-0034 東京都墨田区両国2-16-5 あつまビル5F
> mkubo@3ware.co.jp URL: http://www.3ware.co.jp/
> Phone: 03-4530-8670 03-4530-0521 (内線201)
> Fax: 03-6240-2420
> 携帯: 090-6171-5545
>
> _______________________________________________
> Linux-ha-japan mailing list
> Linux-ha-japan@lists.osdn.me
> http://lists.osdn.me/mailman/listinfo/linux-ha-japan
>