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; #设置主备节点同步时的网络速率
}
}