MySQL online MM architecture manual failover process bitsCN.com
MySQL online MM architecture manual failover process
[] Switching from 11 to 10
Online 10 and 11 Management
Cat/proc/drbd
The normal status is:
[Root @ odb-m10 ~] # Cat/proc/drbd
Version: 8.3.2 (api: 88/proto: 86-90)
GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by root@odb-m10.bg.com, 02:05:57
0: cs: Connected ro: Secondary/Primary ds: UpToDate/UpToDate C r ----
Ns: 0 nr: 602236972 dw: 602236972 dr: 0 al: 0 bm: 1026 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: d oos: 0
-- Automatically switch the script address
[Discard]/etc/drbd. sh
-- 1 View
Clustat
-- 2 clustat
First check the order table data
Mysql> select count (*) from order_xxxx;
Mysql> select count (*) from order_xxxx;
+ ---------- +
| Count (*) |
+ ---------- +
| 1, 889067 |
+ ---------- +
1 row in set (0.34 sec)
Ensure that the data is not lost after the switch.
-- 3 switch to 10 and execute the switch command on 20171000030.21.
【]
1. you need to check which service is on.
2. exit all mysql client windows before switching. Otherwise, the switching will be affected.
Clusvcadm-r mysqlservice-m odb-m10.xx.com
[Comment]
Starting is clusvcadm-e webserver-m web1
Disable clusvcadm-s -M
-- 4 view the status
Clustat
-- 5 check data from the slave database
Mysql> select count (*) from order_xxxx;
-Check 1
Mysql-uadmin-p-P3307-hsf-000030.20 -- default-character-set = utf8
Mysql-uadmin-p-P3307-h127.0.0.1 -- default-character-set = utf8
Check whether logs can be logged in.
-- Check 2
Mk-table-checksum h = limit 30.20, u = admin, p = MPxxxxxx, P = 3307 h = limit 30.23, u = admin, p = MPxxxxxx, P = 3307 h = limit 30.24, u = admin, p = MPxxxxxx, P = 3307 h = 0000000030.25, u = admin, p = MPxxxxxx, P = 3307 h = 0000000030.26, u = admin, p = MPxxxxxx, P = 3307 h = 20171000030.22, u = admin, p = MPxxxxxx, P = 3307
-D oshxx -- count | mk-checksum-filter>/home/check/oshxx_2012-05-17.log
BitsCN.com