global {
usage-count no;
}
common {
net {
#allow-two-primaries; #双主模式
sndbuf-size 512k;
#timeout 60; #6 seconds(unit=0.1seconds)
#connect-int 10; #10 seconds(unit=1seconds)
#ping-int 10; #10 seconds(unit=1seconds)
#ping-timeout 5; #500ms (unit = 0.1seconds)
max-buffers 8000;
unplug-watermark 1024;
max-epoch-size 8000;
#ko-count 4;
#allow-two-primaries;
cram-hmac-alg "sha1";
shared-secret "hdhwXes23sYEhart8t";
after-sb-0pri disconnect;
after-sb-1pri disconnect;
after-sb-2pri disconnect
rr-conflict disconnect;
#data-integrity-alg "md5";
#no-tcp-cork;
}
syncer {
rate 100M;
verify-alg crc32c;
}
}
# primary for drbd1
resource data {
protocol C;
#使用主主模式要另添加以下#号内参数
# net {
# allow-two-primaries;
# }
# startup {
# become-primary-on both;
#}
disk {
on-io-error detach;
no-disk-flushes;
no-md-flushes;
}
on node110 {
device /dev/drbd0;
disk /dev/sdb1;
address 172.16.1.110:7788;
meta-disk /dev/sdb2[0]; #外部模式:数据和元数据盘分开放不同的分区
#meta-disk internal; #内部模式:数据和元数据盘放在一起
}
on node120 {
device /dev/drbd0;
disk /dev/sdb1;
address 172.16.1.120:7788;
meta-disk /dev/sdb2[0];
}
}
2016-11-28
DRBD 主主模式配置
评论
发表评论
姓 名: