drbd 8.3的一个配置文件

操作步骤
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
setenforce 0//关闭seinux
modprobe drbd 加载
lsmod |grep drbd 检查
1 初始化 drbdadm create-md
2 drbdadm up all //启用所有资源
3 drbdadm -- --overwrite-data-of-peer primary data //本端设为主并将数据发送到对方
4 格式化双方的数据盘并且 tune2fs -c -1 /dev/sdb1

created by oldboy 10:48 2013/1/20

global {
# minor-count 64;
# dialog-refresh 5; # 5 seconds
# disable-ip-verification;
usage-count no;
}

common {
protocol C;

disk {
on-io-error detach;
no-disk-flushes;
no-md-flushes;
}

net {
sndbuf-size 512k;
# timeout 60; # 6 seconds (unit = 0.1 seconds)
# connect-int 10; # 10 seconds (unit = 1 second)
# ping-int 10; # 10 seconds (unit = 1 second)
# ping-timeout 5; # 500 ms (unit = 0.1 seconds)
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 630M;
al-extents 517;
}
}

resource data {
on db-1-1 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.0.11.7:7788;
meta-disk /dev/sdb2 [0];
}
on db-1-2 {
device /dev/drbd0;
disk /dev/sdb1;
address 10.0.11.8:7788;
meta-disk /dev/sdb2 [0];
}
}
/////////////////////单节点故障处理/////////////
1 drbd-overview 查看状态
2 modprobe drbd
3 drbdadm up all 启动

你可能感兴趣的:(drbd 8.3的一个配置文件)