ソスfソスBソスXソスNHAソスNソスソスソスXソス^ソスソス(Pacemaker+Corosync+pcs+DRBD)

ソスナ終ソスXソスVソスソスソスF 2020.12.29

ソスソスソスTソスv

DRBDソスナネソスbソスgソスソスソス[ソスNソスヤミソスソスソス[ソスソスソスソスソスOソスソスソスソスソスfソスBソスXソスNソスソスソスNソスソスソスXソス^ソスソスソスソスソスト、ソスソスソスpソスTソス[ソスoソス[ソスソスソスソスソス_ソスEソスソスソスソスソストゑソスソスメ機ソスTソス[ソスoソス[ソスソスソスナ難ソスソスソスソスfソス[ソス^ソスノアソスNソスZソスXソスナゑソスソスソス謔、ソスノゑソスソスソスB

ソスソスHAソスNソスソスソスXソス^ソス[ソスVソスXソスeソスソスソス\ソスzソスソスソスナゑソスソス驍アソスソス


ソスyソスOソスソスソスソスソスソスz
ソスTソス[ソスoソス[1 192.168.1.15 node1
ソスTソス[ソスoソス[2 192.168.1.16 node2
ソスソスソスzIPソスAソスhソスソスソスX 192.168.1.17


ソスソスDRBDソスOソスソス

DRBDソスヘマソスEソスソスソスgソスソスソスxソスソス(/homeソスソスソスフデソスBソスソスソスNソスgソスソス)ソスナはなゑソスソスAソスfソスoソスCソスXソスソスソスxソスソス(/dev/VolGroup00/lvol0ソスソス)ソスナデソス[ソス^ソスフ難ソスdソスソスソスソスソスsソスソスソスソスソス゚、ソスnソス[ソスhソスfソスBソスXソスNソスヌ会ソスソスワゑソスソスヘ、ソスソスソスソスソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスTソスCソスYソスkソスソスソスソスソスソスDRBDソスpソスノ空きゑソスソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスソスヌ会ソス(ソスソスソスヌ会ソスソスソスソスソスソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスノフソス@ソスCソスソスソスVソスXソスeソスソスソスヘ作成ソスソスソスネゑソスソスソスソスソス)ソスソスソスソスB
[root@cl1 ~]# dfソス@ソスソスソス@ソス}ソスEソスソスソスgソス況照会ソス
Filesystem           1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/VolGroup00-LogVol00
                       3428080   1557756   1693380  48% /ソス@ソスソスソス@ソス_ソスソスソス{ソスソスソスソスソス[ソスソス(/dev/mapper/VolGroup00-LogVol00)ソスソス/ソスソスソスソスソスソスソストゑソスソストゑソスソスソス
/dev/sda1               101086     17832     78035  19% /boot
tmpfs                   127796         0    127796   0% /dev/shm

[root@cl1 ~]# grep swap /etc/fstabソス@ソスソスソス@swapソスソスソスソスソストボソスソスソスソスソス[ソスソスソスニ会ソス
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0ソス@ソスソスソス@ソス_ソスソスソス{ソスソスソスソスソス[ソスソス(/dev/VolGroup00/LogVol01)ソスソスswapソスソスソスソスソスソスソストゑソスソストゑソスソスソス

[root@cl1 ~]# lvdisplay -Cソス@ソスソスソス@ソス_ソスソスソス{ソスソスソスソスソス[ソスソスソス齬
  LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao   3.38Gソス@ソスソスソス@/ソスノ奇ソスソスソスソスト済ソスソスソスLソスニ会結ソスハゑソスソス
  LogVol01 VolGroup00 -wi-ao 512.00Mソス@ソスソスソス@swapソスノ奇ソスソスソスソスト済ソスソスソスLソスニ会結ソスハゑソスソス
  lvol0    VolGroup00 -wi-a- 992.00Mソス@ソスソスソス@ソスヌゑソスソスノゑソスソスソスソスソスソストゑソスソストゑソスソスネゑソスソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスソスソスソスLソスニ会結ソスハゑソスソス

ソスソスDRBDソスCソスソスソスXソスgソス[ソスソス

[root@node1 ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpmソス@ソスソスソス@ELRepoソスソスソス|ソスWソスgソスソスソスソスソスソス

[root@node1 ~]# yum -y install kmod-drbd84ソス@ソスソスソス@DRBDソスCソスソスソスXソスgソス[ソスソス

ソスソスDRBDソスン抵ソス

[root@node1 ~]# vi /etc/drbd.d/r0.resソス@ソスソスソス@DRBDソスソスソス\ソス[ソスXソスン抵ソスtソス@ソスCソスソス(ソスソスソス\ソス[ソスXソスソス(ソスソス:r0).res)ソス成
resource r0 {ソス@ソスソスソス@DRBDソスソスソス\ソス[ソスXソスソスソスソスr0ソスニゑソスソスソス
    device    /dev/drbd0;
    meta-disk internal;
    on node1 {ソス@ソスソスソス@node1ソスzソスXソスgソスソス(ソスuuname -nソスvソスRソス}ソスソスソスhソスナ表ソスソスソスソスソスソス髢シソスO)
        disk      /dev/centos/lvol0;ソス@ソスソスソス@node1ソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスソス
        address   192.168.1.15:7780;ソス@ソスソスソス@node1IPソスAソスhソスソスソスX
    }
    on node2 {ソス@ソスソスソス@node2ソスzソスXソスgソスソス(ソスuuname -nソスvソスRソス}ソスソスソスhソスナ表ソスソスソスソスソスソス髢シソスO)
        disk      /dev/centos/lvol0;ソス@ソスソスソス@node2ソス_ソスソスソス{ソスソスソスソスソス[ソスソスソスソス
        address   192.168.1.16:7780;ソス@ソスソスソス@node2IPソスAソスhソスソスソスX
    }
}

[root@node1 ~]# drbdadm create-md r0ソス@ソスソスソス@DRBDソスソスソス^ソスfソス[ソス^ソス成
  --==  Thank you for participating in the global usage survey  ==--
The server's response is:

you are the 2025th user to install this version
initializing activity log
initializing bitmap (36 KB) to all zero
Writing meta data...
New drbd meta data block successfully created.
success

ソスソスDRBDソスNソスソス

[root@node1 ~]# systemctl start drbdソス@ソスソスソス@DRBDソスNソスソス
ソスソスnode2ソスソスソスソスDRBDソスNソスソスソスメゑソスソスニなるたソス゚、ソスソスソスフまま、ソスソスソスソスソスワでゑソスnode2ソスソスソスナゑソスソスソスソス{ソスソスソスソス



ソスソスDRBDソスmソスF

[root@node1 ~]# drbdadm new-current-uuid --clear-bitmap r0/0ソス@ソスソスソス@DRBDソスfソスBソスXソスNソスソスソスソスソスソスソスソスソスXソスLソスbソスv(ソスソスfソスBソスXソスNソスフ場合ソスフゑソス)ソスソスソスfソスBソスXソスNソスノデソス[ソス^ソスソスソスiソス[ソスソスソスソストゑソスソスソス鼾ソスヘスソスLソスbソスvソスソスソスネゑソスソスソスソスソス

[root@node1 ~]# cat /proc/drbdソス@ソスソスソス@node1ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Secondary/Secondary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスメ機ソスソスソス
    ns:0 nr:0 dw:0 dr:0 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node2 ~]# cat /proc/drbdソス@ソスソスソス@node2ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Secondary/Secondary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスメ機ソスソスソス
    ns:0 nr:0 dw:0 dr:0 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node1 ~]# drbdadm primary allソス@ソスソスソス@node1ソスソスソスソスソスソスソスpソスソス

[root@node1 ~]# cat /proc/drbdソス@ソスソスソス@node1ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node1)ソスソスソスソスソスpソス^node2ソスソスソスメ機ソスソスソス
    ns:0 nr:0 dw:0 dr:2120 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node2 ~]# cat /proc/drbdソス@ソスソスソス@node2ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node2)ソスソスソスメ機ソス^node1ソスソスソスソスソスpソスソスソス
    ns:0 nr:0 dw:0 dr:0 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node1 ~]# mkfs.xfs /dev/drbd0ソス@ソスソスソス@node1ソスソスソスソスDRBDソスfソスoソスCソスX(/dev/drbd0)ソスノフソス@ソスCソスソスソスVソスXソスeソスソスソス成
meta-data=/dev/drbd0             isize=512    agcount=4, agsize=67836 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=271342, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

[root@node1 ~]# mount /dev/drbd0 /mntソス@ソスソスソス@node1ソスソスソスソスDRBDソスfソスoソスCソスX(/dev/drbd0)ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスg

[root@node1 ~]# dfソス@ソスソスソス@node1ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1963112 11625368   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   54624   453500   11% /dev/shm
tmpfs                        508124    6856   501268    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
/dev/drbd0                  1075128   32944  1042184    4% /mntソス@ソスソスソス@/dev/drbd0ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソストゑソスソスソス

[root@node1 ~]# touch /mnt/test.txtソス@ソスソスソス@node1ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨテソスXソスgソスtソス@ソスCソスソスソス成

[root@node1 ~]# ll /mnt/ソス@ソスソスソス@node1ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスニ会ソス
ソスソスソスv 0
-rw-r--r-- 1 root root 0 12ソスソス 19 18:36 test.txtソス@ソスソスソス@ソスeソスXソスgソスtソス@ソスCソスソスソスソスソス成ソスソスソスソストゑソスソスソス

[root@node1 ~]# umount /mnt/ソス@ソスソスソス@node1ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスAソスソスソス}ソスEソスソスソスg

[root@node1 ~]# dfソス@ソスソスソス@node1ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1963092 11625388   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   54624   453500   11% /dev/shm
tmpfs                        508124    6856   501268    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
ソス@ソスソスソス@/mntソスfソスBソスソスソスNソスgソスソスソスソスソス}ソスEソスソスソスgソスソスソスソストゑソスソスネゑソス

[root@node1 ~]# drbdadm secondary allソス@ソスソスソス@node1ソスソスソスソスメ機ソスソス

[root@node2 ~]# drbdadm primary allソス@ソスソスソス@node2ソスソスソスソスソスソスソスpソスソス

[root@node1 ~]# cat /proc/drbdソス@ソスソスソス@node1ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node1)ソスソスソスメ機ソス^node2ソスソスソスソスソスpソスソスソス
    ns:12662 nr:0 dw:12662 dr:5334 al:15 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node2 ~]# cat /proc/drbdソス@ソスソスソス@node2ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node2)ソスソスソスソスソスpソス^node1ソスソスソスメ機ソスソスソス
    ns:0 nr:12662 dw:12662 dr:2120 al:8 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node2 ~]# mount /dev/drbd0 /mntソス@ソスソスソス@node2ソスソスソスソスDRBDソスfソスoソスCソスXソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスg

[root@node2 ~]# dfソス@ソスソスソス@node2ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1960972 11627508   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   39216   468908    8% /dev/shm
tmpfs                        508124    6832   501292    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
/dev/drbd0                  1075128   32944  1042184    4% /mntソス@ソスソスソス@/dev/drbd0ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソストゑソスソスソス

[root@node2 ~]# ll /mnt/ソス@ソスソスソス@node2ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスニ会ソス
ソスソスソスv 0
-rw-r--r-- 1 root root 0 12ソスソス 19 18:36 test.txtソス@ソスソスソス@node1ソスソスソスナ作成ソスソスソスソスソスeソスXソスgソスtソス@ソスCソスソス

[root@node2 ~]# umount /mnt/ソス@ソスソスソス@node2ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスAソスソスソス}ソスEソスソスソスg

[root@node2 ~]# drbdadm secondary allソス@ソスソスソス@node2ソスソスソスソスメ機ソスノ戻ゑソス

[root@node1 ~]# drbdadm primary allソス@ソスソスソス@node1ソスソスソスソスソスソスソスpソスノ戻ゑソス

[root@node1 ~]# cat /proc/drbdソス@ソスソスソス@node1ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node1)ソスソスソスソスソスpソス^node2ソスソスソスメ機ソスソスソス
    ns:12662 nr:2050 dw:14713 dr:7454 al:15 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

[root@node2 ~]# cat /proc/drbdソス@ソスソスソス@node2ソスソスソスソスDRBDソスソスヤ確ソスF
version: 8.4.10-1 (api:1/proto:86-101)
GIT-hash: a4d5de01fffd7e4cde48a080e2c686f9e8cebf4c build by mockbuild@, 2017-09-15 14:23:22
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----ソス@ソスソスソス@ソスソスソスzソスXソスg(node2)ソスソスソスメ機ソス^node1ソスソスソスソスソスpソスソスソス
    ns:2050 nr:12662 dw:14713 dr:3216 al:10 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

ソスソスDRBDソスNソスソスソスXソス^ソスソス

[root@node1 ~]# pcs resource create DRBD0 ocf:linbit:drbd drbd_resource="r0" --group apachegroupソス@ソスソスソス@DRBDソスソスソス\ソス[ソスXr0ソスソスソスソスDRBD0ソスニゑソスソスソスソスソスソスOソスナクソスソスソスXソス^ソスソスソス\ソス[ソスXソスノ追会ソス
ソスソスDRBDソスソスソス\ソス[ソスXソスソスr0ソスソスDRBDソスソスソス\ソス[ソスXソスン抵ソスtソス@ソスCソスソスソスノ抵ソス`

[root@node1 ~]# pcs resource master MS_DRBD0 DRBD0 master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=trueソス@ソスソスソス@DRBD0ソスソスmaster/slaveソスソスソスニゑソスソスト設抵ソス
ソスソスソスfソスBソスXソスNソスソスソス時ソスソスソスソスソスソスソス驍スソス゚ソスソス\ソス[ソスXソス両系ソスナ起ソスソスソスソスソスソスwソスソス

[root@node1 ~]# pcs resource cleanup MS_DRBD0ソス@ソスソスソス@ソスXソスeソス[ソス^ソスXソスNソスソスソスA
Cleaning up DRBD0:0 on node2, removing fail-count-DRBD0
Cleaning up DRBD0:0 on node1, removing fail-count-DRBD0
Cleaning up DRBD0:1 on node2, removing fail-count-DRBD0
Cleaning up DRBD0:1 on node1, removing fail-count-DRBD0
Waiting for 4 replies from the CRMd.... OK

[root@node1 ~]# pcs resource showソス@ソスソスソス@ソスソスソス\ソス[ソスXソスmソスF
 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node1
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node1
 Master/Slave Set: MS_DRBD0 [DRBD0]ソス@ソスソスソス@MS_DRBD0
     Masters: [ node1 ]ソス@ソスソスソス@node1ソスソスソスソスmaster
     Slaves: [ node2 ]ソス@ソスソスソス@node2ソスソスソスソスslave

[root@node1 ~]# pcs resource create FS_DRBD0 ocf:heartbeat:Filesystem device=/dev/drbd0 directory=/mnt fstype=xfs --group apachegroupソス@ソスソスソス@/dev/drbd0ソスソスxfsソス`ソスソスソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソスNソスソスソスXソス^ソスソスソス\ソス[ソスXソスソスFS_DRBD0ソスニゑソスソスソスソスソスソスOソスナ追会ソス

[root@node1 ~]# pcs resource showソス@ソスソスソス@ソスソスソス\ソス[ソスXソスmソスF
 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node1
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node1
     FS_DRBD0   (ocf::heartbeat:Filesystem):    Started node1ソス@ソスソスソス@FS_DRBD0
 Master/Slave Set: MS_DRBD0 [DRBD0]
     Masters: [ node1 ]
     Slaves: [ node2 ]

[root@node1 ~]# pcs constraint colocation add apachegroup MS_DRBD0 INFINITY with-rsc-role=Masterソス@ソスソスソス@DRBDソスソスmasterソスソスソスフノソス[ソスhソスナソスソス\ソス[ソスXソスOソスソスソス[ソスv(apachegroup)ソスソスソスNソスソスソスソスソスソス

[root@node1 ~]# pcs constraint order promote MS_DRBD0 then start apachegroupソス@ソスソスソス@MS_DRBD0ソスNソスソスソスソスノソスソス\ソス[ソスXソスOソスソスソス[ソスv(apachegroup)ソスソスソスNソスソスソスソスソスソス
Adding MS_DRBD0 apachegroup (kind: Mandatory) (Options: first-action=promote then-action=start)

[root@node1 ~]# pcs constraint colocation add FS_DRBD0 MS_DRBD0 INFINITY with-rsc-role=Masterソス@ソスソスソス@DRBDソスソスMasterソスソスソスフノソス[ソスhソスソスFS_DRBD0ソスソスソス\ソス[ソスXソスソスソスNソスソスソスソスソスソス

[root@node1 ~]# pcs constraint order promote MS_DRBD0 then start FS_DRBD0ソス@ソスソスソス@MS_DRBD0ソスNソスソスソスソスソスFS_DRBD0ソスソスソス\ソス[ソスXソスソスソスNソスソスソスソスソスソス
Adding MS_DRBD0 FS_DRBD0 (kind: Mandatory) (Options: first-action=promote then-action=start)

ソスソスDRBDソスNソスソスソスXソス^ソスソスソスmソスF

ソスiソスPソスjソスNソスソスソスXソス^ソスmソスF
[root@node1 ~]# dfソス@ソスソスソス@node1ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1966688 11621792   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   39216   468908    8% /dev/shm
tmpfs                        508124    6860   501264    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
/dev/drbd0                  1075128   32944  1042184    4% /mntソス@ソスソスソス@/dev/drbd0ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソストゑソスソスソス

[root@node2 ~]# dfソス@ソスソスソス@node2ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1965148 11623332   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   54624   453500   11% /dev/shm
tmpfs                        508124   13216   494908    3% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
ソス@ソスソスソス@/mntソスfソスBソスソスソスNソスgソスソスソスソスソス}ソスEソスソスソスgソスソスソスソストゑソスソスネゑソス

ソスiソスQソスjソスtソスFソスCソスソスソスIソス[ソスoソス[
[root@node1 ~]# haltソス@ソスソスソス@node1(ソスソスソスpソスソス)ソスVソスXソスeソスソスソスソス~

[root@node2 ~]# pcs statusソス@ソスソスソス@node2ソスソスソスナクソスソスソスXソス^ソスソスヤ確ソスF
Cluster name: mycluster
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum
Last updated: Wed Dec 20 14:50:51 2017
Last change: Tue Dec 19 19:10:58 2017 by root via cibadmin on node1

2 nodes configured
5 resources configured

Online: [ node2 ]
OFFLINE: [ node1 ]ソス@ソスソスソス@node1ソスソスソスIソスtソスソスソスCソスソスソスソスヤになゑソスソスソス

Full list of resources:

 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスノ移難ソスソスソスソスソス
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスノ移難ソスソスソスソスソス
     FS_DRBD0   (ocf::heartbeat:Filesystem):    Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスノ移難ソスソスソスソスソス
 Master/Slave Set: MS_DRBD0 [DRBD0]
     Masters: [ node2 ]ソス@ソスソスソス@DRBDソスソスmasterソスソスnode2ソスソスソスノ切ゑソスヨゑソスソスソスソス
     Stopped: [ node1 ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

[root@node2 ~]# dfソス@ソスソスソス@node2ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1965360 11623120   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   54624   453500   11% /dev/shm
tmpfs                        508124    6824   501300    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
/dev/drbd0                  1075128   32944  1042184    4% /mntソス@ソスソスソス@/dev/drbd0ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソストゑソスソスソス

ソスiソスRソスjソスtソスFソスCソスソスソスoソスbソスN
node1ソスNソスソス

[root@node1 ~]# pcs statusソス@ソスソスソス@ソスNソスソスソスXソス^ソスソスヤ確ソスF
Cluster name: mycluster
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum
Last updated: Wed Dec 20 14:53:27 2017
Last change: Tue Dec 19 19:10:58 2017 by root via cibadmin on node1

2 nodes configured
5 resources configured

Online: [ node1 node2 ]ソス@ソスソスソス@node1ソスソスソスIソスソスソスソスソスCソスソスソスソスヤになゑソスソスソス

Full list of resources:

 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスフまゑソス
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスフまゑソス
     FS_DRBD0   (ocf::heartbeat:Filesystem):    Started node2ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode2ソスソスソスフまゑソス
 Master/Slave Set: MS_DRBD0 [DRBD0]
     Masters: [ node2 ]ソス@ソスソスソス@DRBDソスソスmasterソスソスnode2ソスソスソスフまゑソス
     Slaves: [ node1 ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

[root@node1 ~]# pcs cluster standby node2ソス@ソスソスソス@node2ソスソスソスソスソスXソス^ソスソスソスoソスCソスソスヤへ切托ソス

[root@node1 ~]# pcs statusソス@ソスソスソス@ソスNソスソスソスXソス^ソスソスヤ確ソスF
Cluster name: mycluster
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum
Last updated: Wed Dec 20 15:16:20 2017
Last change: Wed Dec 20 15:16:06 2017 by root via cibadmin on node1

2 nodes configured
5 resources configured

Node node2: standbyソス@ソスソスソス@node2ソスソスソスXソス^ソスソスソスoソスCソスソスヤになゑソスソスソス
Online: [ node1 ]

Full list of resources:

 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスノ移難ソスソスソスソスソス
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスノ移難ソスソスソスソスソス
     FS_DRBD0   (ocf::heartbeat:Filesystem):    Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスノ移難ソスソスソスソスソス
 Master/Slave Set: MS_DRBD0 [DRBD0]
     Masters: [ node1 ]ソス@ソスソスソス@DRBDソスソスmasterソスソスnode1ソスソスソスノ切ゑソスヨゑソスソスソスソス
     Stopped: [ node2 ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

[root@node1 ~]# pcs cluster unstandby node2ソス@ソスソスソス@node2ソスソスソスフスソス^ソスソスソスoソスCソスソスヤゑソスソスソスソスソス

[root@node1 ~]# pcs statusソス@ソスソスソス@ソスNソスソスソスXソス^ソスソスヤ確ソスF
Cluster name: mycluster
Stack: corosync
Current DC: node2 (version 1.1.16-12.el7_4.5-94ff4df) - partition with quorum
Last updated: Wed Dec 20 15:17:16 2017
Last change: Wed Dec 20 15:17:11 2017 by root via cibadmin on node1

2 nodes configured
5 resources configured

Online: [ node1 node2 ]ソス@ソスソスソス@node2ソスソスソスIソスソスソスソスソスCソスソスソスソスヤになゑソスソスソス

Full list of resources:

 Resource Group: apachegroup
     vipcheck_res       (ocf::myres:VIPcheck):  Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスフまゑソス
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスフまゑソス
     FS_DRBD0   (ocf::heartbeat:Filesystem):    Started node1ソス@ソスソスソス@ソスソスソス\ソス[ソスXソスソスnode1ソスソスソスフまゑソス
 Master/Slave Set: MS_DRBD0 [DRBD0]
     Masters: [ node1 ]ソス@ソスソスソス@DRBDソスソスmasterソスソスnode1ソスソスソスフまゑソス
     Slaves: [ node2 ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled

[root@node1 ~]# dfソス@ソスソスソス@node1ソスソスソスナデソスBソスXソスNソス}ソスEソスソスソスgソスソスヤ確ソスF
ソスtソス@ソスCソスソスソスVソスX            1K-ソスuソスソスソスbソスN    ソスgソスp   ソスgソスpソスソス ソスgソスp% ソス}ソスEソスソスソスgソスハ置
/dev/mapper/centos-root    13588480 1967292 11621188   15% /
devtmpfs                     497288       0   497288    0% /dev
tmpfs                        508124   39216   468908    8% /dev/shm
tmpfs                        508124    6824   501300    2% /run
tmpfs                        508124       0   508124    0% /sys/fs/cgroup
/dev/vda1                    508588  214040   294548   43% /boot
tmpfs                        101628       0   101628    0% /run/user/0
/dev/drbd0                  1075128   32944  1042184    4% /mntソス@ソスソスソス@/dev/drbd0ソスソス/mntソスfソスBソスソスソスNソスgソスソスソスヨマソスEソスソスソスgソスソスソスソストゑソスソスソス


ソスソスソスヨ連ソスRソスソスソスeソスソスソスc

<!ソス\ソスeソスLソスXソスgソスフみゑソス4ソスsソス\ソスソスソスノ追会ソスソスソスCソスソスソスソスソスソス\>



ソスソスソスソスソスフペソス[ソスWソスフトソスbソスvソスヨ戻ゑソス

ソスvソスソスソスCソスoソスVソス[ソス|ソスソスソスVソス[
centossrv.com