• RSS订阅
  • 交换链接
  • 首页

Jeffrey’s Blog

关注系统架构优化,WEBAPP应用


Tag Archive for 'lvs'

使用heartbeat做双机热备笔记

September 20th, 2007

作者: Jeffrey
出处: http://blog.zhangjianfeng.com/?p=638
我用到的集群系统主要就2种:
高可用(High Availability)HA集群, 使用Heartbeat实现;也会称为”双机热备”, “双机互备”, “双机”。
阅读全文——共1262字

2007/09/20 | 阅读全文 | 系统管理 | Email This Post | Print This Post | 1,761 views |
收藏到网摘: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

LVS安装笔记

May 16th, 2006

作者: Jeffrey
出处:http://blog.zhangjianfeng.com/?p=310
1.升级内核至最新,我安装的是2.6.16.16
2.http://www.linuxvirtualserver.org/software/下载对应内核的ipvsadm-1.24-6源程序,ipvsadm-1.24-6.src.rpm,rpmbuild –rebuild ipvsadm-1.24-6.src.rpmrpm -ivh /usr/src/redhat/RPMS/i386/ipvsadm-1.24-6.i386.rpm
阅读全文——共9680字

2006/05/16 | 阅读全文 | 应用服务 | Email This Post | Print This Post | 1,324 views |
收藏到网摘: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

LVS的配置详解配置

March 31st, 2006

Red Hat Cluster Manager安装操作系统,选择组件advance server,安装LVS部分。两台主机,主机名为haha和hehe主机haha的本地ip地址为net0:192.168.2.11,net1:192.168.2.14主机hehe的本地ip地址为net0:192.168.2.12,net1:192.168.2.16(主机网络连线只能用直连线进行连接,不能用交叉线连接,否则双机不能进行监控)修改/etc/hosts文件,封掉localhost行的内容,写入本地主机、对方主机和虚拟主机相应的ip地址和主机名:(两台主机配置相同)192.168.2.11 haha192.168.2.12 hehe192.168.2.13 xixi进入/etc/sysconfig/rawdevices文件,增加两行内容:(两台主机设置相同)/dev/raw/raw1 /dev/sdb1/dev/raw/raw2 /dev/sdb2以上两行是LVS需要的两个裸设备作为系统监控使用,每个裸设备的空间不能小于10M。当然需要fdisk建立两个两个相应的设备。然后从起主机,进入/sbin下,./cluconfig进行cluster的配置:Red Hat Cluster Manager Configuration Utility (running on haha) –haha为本地主机名Enter cluster name [Red Hat Cluster Manager]:xixi –xixi为虚拟主机名Enter IP address for cluster alias [NONE]:192.168.2.13 –地址为虚拟地址——————————–Information for Cluster Member 0——————————–Enter name of cluster member [haha]: –本地成员,回车即可Enter number of heartbeat channels (minimum = 1) [1]: 2 –两块网卡心跳线(也可串口心跳)Channel type: net or serial [net]: –第一块网卡做心跳Enter hostname of the cluster member on heartbeat channel 0 [haha]: –心跳线成员名称Channel type: net or serial [net]: –第二块网卡做心跳线Enter hostname of the cluster member on heartbeat channel 1:hehe –另外一个成员名称Information about Quorum PartitionsEnter Primary Quorum Partition [/dev/raw/raw1]:Enter Shadow Quorum Partition [/dev/raw/raw2]:Information About the Power Switch That Power Cycles Member ‘haha’Choose one of the following power switches:o NONEo RPS10o BAYTECHo APCSERIALo APCMASTERo WTI_NPSo SW_WATCHDOGPower switch [NONE]:——————————–Information for Cluster Member 1——————————–Enter name of cluster member:hehe –对方成员名Enter hostname of the cluster member on heartbeat channel 0: heheEnter hostname of the cluster member on heartbeat channel 1: hahaInformation about Quorum PartitionsEnter Primary Quorum Partition [/dev/raw/raw1]:Enter Shadow Quorum Partition [/dev/raw/raw2]:Information About the Power Switch That Power Cycles Member ‘hehe’Choose one of the following power switches:o NONEo RPS10o BAYTECHo APCSERIALo APCMASTERo WTI_NPSo SW_WATCHDOGPower switch [NONE]:Save the cluster member information? yes/no [yes]: –对配置信息进行保存Save the cluster member information? yes/no [yes]:Writing to configuration file…doneConfiguration information has been saved to /etc/cluster.conf.—————————-Setting up Quorum Partitions—————————-Running cludiskutil -I to initialize the quorum partitions: doneSaving configuration information to quorum partitions: doneDo you wish to allow remote monitoring of the cluster? yes/no [yes]: –是否允许远程主机进行cluster监视访问Configuration on this member is complete.To configure the next member, invoke the following command on that system:# /sbin/cluconfig –init=/dev/raw/raw1Refer to the Red Hat Cluster Manager Installation and Administration Guidefor details.本地主机配置完成进入对方主机的/sbin目录,执行cluconfig –init=/dev/raw/raw1显示信息如下:Information about Channel 0/sbin/cluconfig: [: haha: unary operator expectedLooking for host haha (may take a few seconds)…Information about Channel 1/sbin/cluconfig: [: hehe: unary operator expectedLooking for host hehe (may take a few seconds)…Information about Quorum PartitionsInformation About the Power Switch That Power Cycles Member ‘haha’Note: Operating a cluster without a remote power switch does not prmaximum data integrity guarantees.——————————–Information for Cluster Member 1——————————–/sbin/cluconfig: [: hehe: unary operator expectedLooking for host hehe (may take a few seconds)…Information about Channel 0/sbin/cluconfig: [: hehe: unary operator expectedLooking for host hehe (may take a few seconds)…Information about Channel 1/sbin/cluconfig: [: haha: unary operator expectedLooking for host haha (may take a few seconds)…Hostname does not map to any interface. Keep your selection? [yes]:Information about Quorum PartitionsInformation About the Power Switch That Power Cycles Member ‘hehe’Note: Operating a cluster without a remote power switch does not providemaximum data integrity guarantees.Press <Return> to continue. –按回车继续Cluster name: xixiCluster alias IP address: 192.168.2.13——————–Member 0 Information——————–Name: hahaPrimary quorum partition: /dev/raw/raw1Shadow quorum partition: /dev/raw/raw2Heartbeat channels: 2Channel type: net, Name: hahaChannel type: net, Name: hehePower switch IP address or hostname: hahaIdentifier on power controller for member haha: un——————–Member 1 Information——————–Name: hehePrimary quorum partition: /dev/raw/raw1Shadow quorum partition: /dev/raw/raw2Heartbeat channels: 2Channel type: net, Name: heheChannel type: net, Name: hahaPower switch IP address or hostname: heheIdentifier on power controller for member hehe: un————————–Power Switch 0 Information————————–Power switch IP address or hostname: hahaType: NONELogin or port: unusedPassword: unused————————–Power Switch 1 Information————————–Power switch IP address or hostname: heheType: NONELogin or port: unusedPassword: unusedSave the cluster member information? yes/no [yes]: –是否进行保存Writing to configuration file…doneConfiguration information has been saved to /etc/cluster.conf.Saving configuration information to quorum partitions: doneDo you wish to allow remote monitoring of the cluster? yes/no [yes]:—————————————————————-Configuration on this member is complete.Execute “/sbin/service cluster start” to start the cluster software.这时,双机软件基本配置已经完成,在两台主机上分别运行service cluster start启动服务通过cluadmin进行管理,如下所示:cluadmin> cluster statusCluster Status Monitor (xixi) 11:16:11Cluster alias: xixi========================= M e m b e r S t a t u s ==========================Member Status Node Id Power Switch————– ———- ———- ————haha Up 0 Goodhehe Up 1 Good========================= H e a r t b e a t S t a t u s ====================Name Type Status—————————— ———- ————haha <–> hehe network ONLINE========================= S e r v i c e S t a t u s ========================Last Monitor RestartService Status Owner Transition Interval Count————– ——– ————– —————- ——– ——-cluadmin>通过状态可以看到双机状态正常,但未加入任何服务,通过help可以看到帮助:cluadmin> helpcluster service apropos clear help version exit quitcluadmin> service add –加入一个服务Service name: disk –服务名称Preferred member [None]:haha –首选成员User script (e.g., /usr/foo/script or None) [None]: –用户脚本Status check interval [0]: –状态检测间隔Do you want to add an IP address to the service (yes/no/?) [no]:Do you want to add a disk device to the service (yes/no/?) [no]: yes –加disk设备Disk Device InformationDevice special file (e.g., /dev/sdb4): /dev/sdb3 –设备名称Filesystem type (e.g., ext2, or ext3): ext2 –文件系统类型Mount point (e.g., /usr/mnt/service1) [None]: /mnt –mount点Mount options (e.g., rw,nosuid,sync):Forced unmount support (yes/no/?) [yes]: –是否强制unmountWould you like to allow NFS access to this filesystem (yes/no/?) [no]:Would you like to share to Windows clients (yes/no/?) [no]:Do you want to (a)dd, (m)odify, (d)elete or (s)how DEVICES, or are you (f)inished adding DEVICES [f]:Add disk service as shown? (yes/no/?) yes –是否加入服务0) haha1) hehec) cancelChoose member to start service on: 0 –在首选哪台主机启动Added disk. –加入服务成功

2006/03/31 | 阅读全文 | 应用服务 | Email This Post | Print This Post | 915 views |
收藏到网摘: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网


You are currently browsing the Jeffrey's Blog weblog archives for 'lvs' tag.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

    最新文章

    • sql 调优整理[zz]
    • 在 Oracle 数据库 10g中轻松进行响应时间分析[zz]
    • 通过shell脚本实现FTP自动上传apache日志
    • P1i手机CDA162022/8 R6E30--->cda162024/95 R10A升级笔记
    • vsftpd配置文件
    • squid日志状态说明
    • Shell中的grep、awk和sed的常用命令和语法
    • 一个gvim配置文件,用于gvim显示中文文件乱码。
    • 使用gnokii+短信猫+SIM卡,为Nagios配置短信通知功能
    • 电脑一族保健操

    评分最高文章

      • 十二星座2008年运程
      • RedHat Enterprise Linux在IBM System x服务器上的调优(一)
      • Legato networker学习笔记(杂)
      • linux tips 技巧笔记
      • [BT下载]2006韩剧-葡萄园的那小伙儿
      • 我家的金吉拉
      • 卡巴斯基病毒库离线更新方法
      • 今天下载的一个CHM文件,打开时右边的内容看不到,提示“该页无法显示”。
      • 忽悠姐妹花主题曲下载
      • 轻轻松松把 Apache 配置安全

    随机文章:

    • crontab应用详解
    • 十二星座2007年星座运势
    • 各RAID级别的图形化说明
    • linux tips 技巧笔记
    • resume a session you started on your physical display
    • 在编译jabberd时出现不能找到mysql client libraries
    • dhcp简单安装笔记
    • 关闭"SYMANTEC 防篡改警报"弹出警告
    • 日志检查工具——Logcheck
    • 如何让tomcat不显示文件列表

    最新评论

    • 亦庄网通运营商.从事IDC主机托管业务...
    • [...] 这个问题的解决办法是从http://blo...
    • 非常好非常...
    • 多谢分享,我会用了,支持...
    • 看不多,但顶一下...
    • 非常...
    • 廊坊机房|廊坊电信机房|廊坊双线机...
    • 呵呵 搜到这里 打个招...
    • To Gin, 链接已...
    • :em12: :em12: :em12...


    邮件订阅  
  • Categories

    • 个人日志 (15)
    • 休闲娱乐 (79)
    • 应用服务 (84)
    • 影音娱乐 (9)
    • 电脑网络 (77)
    • 站点日志 (19)
    • 系统管理 (236)
    • 英语学习 (15)
    • 衣食住行 (40)
    • 资料共享 (27)
  • 工具网址

    • 网址收藏
    • 钢笔字在线生成
    • 健康自测
    • 电影下载
    • 在线听歌
    • 天气预报
    • 常用电话
    • 疾病查询
    • 食谱查询
    • 在线翻译
    • Alexa排名查询
    • IP信息查询
    • 邮箱图标生成
    • 我的Firefox插件
  • 友情链接

    • I’am Gin
    • linuxの飘扬
    • winter的平凡生活
    • 伤感星星的天空
    • 回忆未来[张宴]
    • 姚亮的博客
    • 扶凯Blog
    • 沐宇春风
    • 爱MySQL中文网
    • 狗.车.志
    • 非礼勿视
  • Tags

    • 下载 优化 使用 免费 内核 北京 升级 学习 学习笔记 安装 工具 技巧 日志 最新 服务器 笔记 视频 解决 调优 软件 运势 运程 配置 配置文件 问题 2007 apache blog dreamhost freebsd Legato linux lvs mysql networker oracle RAID5 RedHat sendmail shell squid suse Ubuntu windows wordpress

Jeffrey's Blog is powered by WordPress 2.3.1 and Unnamed 1.22
Entries (RSS) and Comments (RSS) Admin 京ICP备06038449号

Podcast Powered by podPress (v8.7)