手机版
你好,游客 登录 注册
背景:
阅读新闻

DRBD+Heartbeat+NFS实现Linux高可用群集(HA)

[日期:2012-05-27] 来源:Linux社区  作者:zhuchaobo [字体:大 中 小]
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.linux
相关资讯       Linux集群  高可用群集 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款