2、从属服务器配置:
1、新建分区:(注意新建分区大小与主服务器一样)
[root@slave ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n #增加新分区
Command action
e extended
p primary partition (1-4)
p #增加主分区
Selected partition 4
First cylinder (1580-2610, default 1580): #默认柱面,直接回车
Using default value 1580
Last cylinder or +size or +sizeM or +sizeK (1580-2610, default 2610): +1G #大小为1G
Command (m for help): W #保存退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@slave ~]# partprobe /dev/sda
2、安装drdb:
[root@slave ~]# mkdir /mnt/cdrom/
[root@slave ~]# mount /dev/cdrom /mnt/cdrom/
[root@slave ~]#yum localinstall drbd83-8.3.8-1.el5.CentOS.i386.rpm kmod-drbd83-8.3.8-1.el5.centos.i686.rpm –nogpgcheck -y
[root@slave ~]# cp /usr/share/doc/drbd83-8.3.8/drbd.conf /etc/
3、检测配置文件
[root@slave drbd.d]# drbdadm adjust web
4、创建web 的资源
[root@slave drbd.d]# drbdadm create-md web
Writing meta data...
initializing activity log
NOT initialized bitmap
New drbd meta data block successfully created.
DRBD+Heartbeat+NFS实现Linux高可用群集(HA)(3)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/f4e6da8fa84110e4e513807b03a98bd9.html