发布时间:2013-11-11 15:44:44
今天,一个很偶然的机会,看到了一本北京邮电大学出版社出版的技术图书《Linux服务器架设、性能调优、集群管理教程——实训与项目案例》,感觉有种似曾相识的感觉,于是打开目录大概了解了下,一个我不想看到的现象发生了:此时一共有16章,而最后4章看着眼熟,于是仔细看了下目录结构,竟然与我2009年写的一本书《循序渐.........【阅读全文】
ctpyy2013-10-12 11:45
drbd2 \drbd3都执行上面操作
在drbd2上
cat /proc/drbd
[root@drbd2 ~]# cat /proc/drbd
version: 8.4.3 (api:1/proto:86-101)
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root@drbd2, 2013-10-11 17:31:28
0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r----s
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:2268264
在drbd3上
[root@drbd3 ~]# cat /proc/drbd
version: 8.4.3 (api:1/proto:86-101)
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root@drbd3, 2013-10-11 17:36:58
0: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r-----
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
现在的问题就是为什么我这里 cs:WFConnection ro:Secondary/Unknown而不是你书上说的 cs:Connection ro:Secondary/Secondary?????
求指教
ctpyy2013-10-12 11:45
ping-int 10;
max-buffers 2048;
max-epoch-size 2048;
}
syncer { rate 30M;}
on drbd2{
device /dev/drbd0;
disk /dev/sda5;
address 192.168.100.51:7788;
meta-disk internal;
}
on drbd3{
device /dev/drbd0;
disk /dev/sda5;
address 192.168.100.55:7788;
meta-disk internal;
}
}
4、新建分区 /dev/sda5
fdisk /dev/sda
n
n
w
reboot
5、创建DRBD设备并激活r0资源
mknod /dev/drbd0 b 147 0
drbdadm create-md r0
drbdadm create-md r0
6\启动服务
/etc/init.d/drbd start
ctpyy2013-10-12 11:44
最近为了学习drbd还专门买了一本你出的linux书,在虚拟机中测试遇到一些问题望有空时指点指点
drbd2作主,drbd3作从
1\在2台电脑上设置
vi /etc/hosts
192.168.100.51 drbd2
192.168.100.55 drbd3
2、drbd安装
cd /usr/local
yum install gcc gcc-c++ make glibc flex kernel-devel kernel-headers perl
wget http://oss.linbit.com/drbd/8.4/drbd-8.4.3.tar.gz
tar zxvf drbd-8.4.3.tar.gz
cd drbd-8.4.3
./configure --prefix=/usr/local/drbd --with-km
make KDIR=/usr/src/kernels/2.6.32-358.18.1.el6.x86_64
make install
mkdir -p /usr/local/drbd/var/run/drbd
cp /usr/local/drbd/etc/rc.d/init.d/drbd /etc/rc.d/init.d
chkconfig --add drbd
chkconfig drbd on
cd drbd
cp drbd.ko /lib/modules/$(uname -r)/kernel/lib/
depmod
modprobe drbd
3、建配置文件drbd.conf
vi /usr/local/drbd/etc/drbd.conf
resource r0{
protocol C;
startup { wfc-timeout 0; degr-wfc-timeout 120;}
disk { on-io-error detach;}
net{
timeout 60;
connect-int 10;