夜鸣猪 2015-01-26 07:06 采纳率: 0%
浏览 3230

heartbeat+drbd实现双机备份,drbd启动报错

drbd启动报错:
主机:
[root@bjfu1 drbd.d]# service drbd start
Starting DRBD resources: [
create res: r1
prepare disk: r1
adjust disk: r1:failed(apply-al:255)
adjust net: r1
]
..........


DRBD's startup script waits for the peer node(s) to appear.

  • In case this node was already a degraded cluster before the reboot the timeout is 0 seconds. [degr-wfc-timeout]
  • If the peer was available before the reboot the timeout will expire after 0 seconds. wfc-timeout To abort waiting enter 'yes' [1944]: yes

.
备机:
[root@bjfu2 drbd.d]# service drbd start
Starting DRBD resources: [
adjust disk: r1:failed(attach:10)
]
..........


DRBD's startup script waits for the peer node(s) to appear.

  • In case this node was already a degraded cluster before the reboot the timeout is 0 seconds. [degr-wfc-timeout]
  • If the peer was available before the reboot the timeout will expire after 0 seconds. wfc-timeout To abort waiting enter 'yes' [ 17]:

我的配置文件drbd.res:
resource r1 { #这个r1是定义资源的名字
on bjfu1 { #on开头,后面是主机名称
device /dev/drbd0; #drbd设备名称
disk /dev/sdb1; #drbd0使用的磁盘分区为sdb1
address 10.0.0.1:7789; #设置drbd监听地址与端口
meta-disk internal;
}
on bjfu2 { #on开头,后面是主机名称
device /dev/drbd0; #drbd设备名称
disk /dev/sdb1; #drbd0使用的磁盘分区为sdb1
address 10.0.0.2:7789; #设置drbd监听地址与端口
meta-disk internal;
}
}

我的配置文件global_common.conf:
global {
usage-count yes;
}

common {
handlers {
pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f";
local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f";
}

startup {

}

options {

}

disk {
    on-io-error detach; #配置I/O错误处理策略为分离 
}

net {

}

syncer {
    rate 1024M; #设置主备节点同步时的网络速率
} 

}

  • 写回答

4条回答 默认 最新

  • LGDDD99 2017-02-09 10:08
    关注

    这是错误原因“adjust disk: r1:failed(attach:10)“
    添加新硬盘不要格,使用drbdadm create-md r1发现 另外disk /dev/sdb1改为disk /dev/sdb方可正常启动

    评论

报告相同问题?

悬赏问题

  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常
  • ¥15 关于风控系统,如何去选择
  • ¥15 这款软件是什么?需要能满足我的需求
  • ¥15 SpringSecurityOauth2登陆前后request不一致