马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
[color=rgba(58, 58, 58, 0.88)]问题1、’ha’ ignored, since this host (node2.centos.bz) is not mentioned with an ‘on’ keyword.? [color=rgba(58, 58, 58, 0.88)]错误信息:
: x4 \1 C ^9 R7 j1 T; w执行指令 drbdadm create-md ha 时出现如下错误信息:
, b* A5 u. V& M5 z$ S: `‘ha’ ignored, since this host (node2.centos.bz) is not mentioned with an ‘on’ keyword. [color=rgba(58, 58, 58, 0.88)]解决方法:
2 B9 z m0 Y& G2 z/ X. c因为在 drbd 设定 drbd.conf 中 on 本来写的是 node1、node2 而以,将node1和node2分别改为node1.centos.bz,node2.centos.bz。 [color=rgba(58, 58, 58, 0.88)]问题2、drbdadm create-md ha: exited with coolpre 20? [color=rgba(58, 58, 58, 0.88)]错误信息:+ n& T1 s' [4 r6 u/ I3 [6 Y4 h/ C
执行指令 drbdadm create-md ha 时出现如下错误信息: [color=rgba(58, 58, 58, 0.88)]open(/dev/hdb1) failed: No such file or directory
8 I! _" q. @8 A, }Command ‘drbdmeta 0 v08 /dev/hdb1 internal create-md’ terminated with exit coolpre 205 `. o& }+ z, k3 N& u
drbdadm create-md ha: exited with coolpre 20 [color=rgba(58, 58, 58, 0.88)]解决方法:
, F& |; Q! L) @. a6 _0 p7 t因为忘了执行 fdisk /dev/hdb 指令建立分割区所造成,如下将 /dev/hdb 建立分割区后指令即可正常执行 - # fdisk /dev/hdb //准备为 hdb 建立分割区
- The number of cylinders for this disk is set to 20805.
- There is nothing wrong with that, but this is larger than 1024,
- and could in certain setups cause problems with:
- 1) software that runs at boot time (e.g., old versions of LILO)
- 2) booting and partitioning software from other OSs
- (e.g., DOS FDISK, OS/2 FDISK)
- Command (m for help): n //键入 n 表示要建立分割区
- Command action
- e extended
- p primary partition (1-4)
- p //键入 p 表示建立主要分割区
- Partition number (1-4): 1 //键入 1 为此主要分割区代号
- First cylinder (1-20805, default 1): //开始磁柱值,按下 enter 即可
- Using default value 1
- Last cylinder or +size or +sizeM or +sizeK (1-20805, default 20805): //结束磁柱值,按下 enter 即可
- Using default value 20805
- Command (m for help): w //键入 w 表示确定执行刚才设定
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- Syncing disks.
; q8 X# r/ ~+ `" G. k
[color=rgba(58, 58, 58, 0.88)][root@node1 yum.repos.d]# partprobe //使刚才的 partition table 变更生效 [color=rgba(58, 58, 58, 0.88)]问题3、drbdadm create-md ha: exited with coolpre 40? [color=rgba(58, 58, 58, 0.88)]错误信息:
; A o6 S' e4 y0 u2 b& A执行指令 drbdadm create-md ha 时出现如下错误信息: - Device size would be truncated, which
- would corrupt data and result in
- 'access beyond end of device' errors.
- You need to either
- * use external meta data (recommended)
- * shrink that filesystem first
- * zero out the device (destroy the filesystem)
- Operation refused.
- Command 'drbdmeta 0 v08 /dev/hdb1 internal create-md' terminated with exit coolpre 40
- drbdadm create-md ha: exited with coolpre 40/ M; c6 P( Q7 ~; d- n+ Y2 L
[color=rgba(58, 58, 58, 0.88)]解决方法:
+ b2 P, x' [2 k. K, ^1 D& q使用 dd 指令将一些资料塞到 /dev/hdb 后再执行 drbdadm create-md ha 指令即可顺利执行 [color=rgba(58, 58, 58, 0.88)]# dd if=/dev/zero of=/dev/hdb1 bs=1M count=100 [color=rgba(58, 58, 58, 0.88)]问题4、DRBD 状态始终是 Secondary/Unknown? [color=rgba(58, 58, 58, 0.88)]错误信息:4 S8 I# r) v% e& k
Node1、Node2 主机启动 DRBD 后状态始终是 Secondary/Unknown - #service drbd status
- drbd driver loaded OK; device status:
- version: 8.3.8 (api:88/proto:86-94)
- GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:16
- m:res cs ro ds p mounted fstype
- 0:ha WFConnection Secondary/Unknown Inconsistent/DUnknown C
3 _4 q0 o5 l+ J
[color=rgba(58, 58, 58, 0.88)]解决方法: Z! r: W: j+ M; J
1、Node1、Node2 没有打开相对应的 Port,请开启相对应的 Port 或先把 IPTables 服务关闭即可。
; D0 ^% D: b2 _+ K5 T" M& t w: p2、可能发生了脑裂行为,一般出现在ha切换时,解决方法:; e6 c7 e" Z+ n' _% X
在一节点执行:
/ S1 l) T/ y) ~' v' ]! P0 l* @drbdadm secondary resource
: X8 G9 B' o2 J% ^; z% rdrbdadm connect –discard-my-data resource' m1 t2 ]. B6 [- {) c8 G" u$ c+ n
另一节点执行:' ~' d$ H- T) r4 F& O5 D, Q
drbdadm connect resource [color=rgba(58, 58, 58, 0.88)]问题5、1: Failure: (104) Can not open backing device [color=rgba(58, 58, 58, 0.88)]错误信息:
7 r6 ]; n' \0 Q" S I8 ?& g执行drbdadm up r0时出现: [color=rgba(58, 58, 58, 0.88)]1: Failure: (104) Can not open backing device.
7 Y; U3 N! I9 D k& V9 rCommand ‘drbdsetup attach 1 /dev/sdb1 /dev/sdb1 internal’ terminated with exit pre 10 [color=rgba(58, 58, 58, 0.88)]解决方法:
' L! L% U( I6 k" _可能因为你挂载了/dev/sdb1,执行umount /dev/sdb1即可。 2 E+ S4 M I+ O- {* d5 ^
& \: s. n6 A$ f
/ w5 n/ X, e0 S# g0 ]+ G[color=rgba(58, 58, 58, 0.87843137254902)] drbdadm create-md image [color=rgba(58, 58, 58, 0.87843137254902)]/dev/loop3 is only 0 bytes. That's not enough. [color=rgba(58, 58, 58, 0.87843137254902)]Command 'drbdmeta 1 v08 /dev/loop3 flex-external create-md' terminated with exit code 10 0 @, S# }4 v3 f$ D4 U
! T3 ?" \. }4 E( l5 m: Z+ @1 X |