| 用VMWARE安装配置GFS(使用DLM方法) |
|
| |
|
本文参考文献: REDHAT官方网站: Red Hat GFS 6.1 Administrator's Guide http://www.redhat.com/docs/manuals/csgfs/browse/rh-gfs-en/index.html Red Hat Cluster Suite Configuring and Managing a Cluster http://www.redhat.com/docs/manuals/csgfs/browse/rh-cs-en/index.html CU网站: GFS6.1 ON RHAS4 U2安装文档 http://www.chinaunix.net/jh/4/746833.html RedHat GFS 集群文件系统入门和进阶 资源帖 http://bbs.chinaunix.net/viewthread.php?tid=777867&extra=page%3D1%26filter%3Ddigest 用VMware GSX和W2K 群集服务实现Exchange群集 http://www.chinaunix.net/jh/34/299757.html
注视:本文后半部分5-10部分基本抄袭suran007 同学的文章,但是去掉了LVM部分,因为没有这个环境。特此GPL公告。 后面我将写一个前端LVS,后端GFS的配置文档,希望对大家有所帮助。
一、测试环境 主机:一台PC,AMD-64位的芯片,1G内存,安装CentOS-4.4-x86_64版本的操作系统 在这个主机上面安装了三个虚拟机,全部安装CentOS-4.4-x86_64版本的操作系统,未进行内核定制,也未打内核补丁,同时安装了X-windows系统,同时参考 http://www.chinaunix.net/jh/34/299757.html 这篇文章创建了共享磁盘,三个虚拟机使用一个共享磁盘,不过我的网卡一开始就设了两个
二、需要安装的包以及顺序
包下载地址: http://mirror.centos.org/centos/4/csgfs/x86_64/RPMS/
2.1. 在所有节点上安装必须的软件包,软件包完整列表请参考GFS6.1用户手册 (http://www.redhat.com/docs/manuals/csgfs/browse/rh-gfs-en/ch-install.html#S1-PKG-
INSTALL)
rgmanager — Manages cluster services and resources
system-config-cluster — Contains the Cluster Configuration Tool, used to graphically configure the cluster and the display of the current status of the
nodes, resources, fencing agents, and cluster services
ccsd — Contains the cluster configuration services daemon (ccsd) and associated files
magma — Contains an interface library for cluster lock management
magma-plugins — Contains plugins for the magma library
cman — Contains the Cluster Manager (CMAN), which is used for managing cluster membership, messaging, and notification
cman-kernel — Contains required CMAN kernel modules
dlm — Contains distributed lock management (DLM) library
dlm-kernel — Contains required DLM kernel modules
fence — The cluster I/O fencing system that allows cluster nodes to connect to a variety of network power switches, fibre channel switches, and integrated
power management interfaces
gulm — Contains the GULM lock management userspace tools and libraries (an alternative to using CMAN and DLM).
iddev — Contains libraries used to identify the file system (or volume manager) in which a device is formatted
Also, you can optionally install Red Hat GFS on your Red Hat Cluster Suite. Red Hat GFS consists of the following RPMs:
GFS — The Red Hat GFS module
GFS-kernel — The Red Hat GFS kernel module
gnbd — The GFS Network Block Device module
gnbd-kernel — Kernel module for the GFS Network Block Device
lvm2-cluster — Cluster extensions for the logical volume manager
GFS-kernheaders — GFS kernel header files
gnbd-kernheaders — gnbd kernel header files
2.2 安装软件和顺序 安装脚本,install.sh #!/bin/bash
rpm -ivh kernel-smp-2.6.9-42.EL.x86_64.rpm rpm -ivh kernel-smp-devel-2.6.9-42.EL.x86_64.rpm
rpm -ivh perl-Net-Telnet-3.03-3.noarch.rpm rpm -ivh magma-1.0.6-0.x86_64.rpm
rpm -ivh magma-devel-1.0.6-0.x86_64.rpm
rpm -ivh ccs-1.0.7-0.x86_64.rpm rpm -ivh ccs-devel-1.0.7-0.x86_64.rpm
rpm -ivh cman-kernel-2.6.9-45.4.centos4.x86_64.rpm rpm -ivh cman-kernheaders-2.6.9-45.4.centos4.x86_64.rpm rpm -ivh cman-1.0.11-0.x86_64.rpm rpm -ivh cman-devel-1.0.11-0.x86_64.rpm
rpm -ivh dlm-kernel-2.6.9-42.12.centos4.x86_64.rpm rpm -ivh dlm-kernheaders-2.6.9-42.12.centos4.x86_64.rpm rpm -ivh dlm-1.0.1-1.x86_64.rpm rpm -ivh dlm-devel-1.0.1-1.x86_64.rpm
rpm -ivh fence-1.32.25-1.x86_64.rpm
rpm -ivh GFS-6.1.6-1.x86_64.rpm rpm -ivh GFS-kernel-2.6.9-58.2.centos4.x86_64.rpm rpm -ivh GFS-kernheaders-2.6.9-58.2.centos4.x86_64.rpm
#gnbd: rpm -ivh gnbd-kernel-2.6.9-9.43.centos4.x86_64.rpm rpm -ivh gnbd-kernheaders-2.6.9-9.43.centos4.x86_64.rpm rpm -ivh gnbd-1.0.7-0.x86_64.rpm
rpm -ivh gulm-1.0.7-0.x86_64.rpm rpm -ivh gulm-devel-1.0.7-0.x86_64.rpm
rpm -ivh iddev-2.0.0-3.x86_64.rpm rpm -ivh iddev-devel-2.0.0-3.x86_64.rpm
rpm -ivh magma-plugins-1.0.9-0.x86_64.rpm
rpm -ivh rgmanager-1.9.53-0.x86_64.rpm
rpm -ivh system-config-cluster-1.0.25-1.0.noarch.rpm
rpm -ivh ipvsadm-1.24-6.x86_64.rpm
rpm ivh piranha-0.8.2-1.x86_64.rpm --nodeps
注视:有些包有依赖关系,使用nodeps开关进行安装即可,另外因为本人安装了X-windows,所以gnome的包没写在这里
2.3、修改各个节点上的/etc/hosts文件(每个节点都一样) 如下: [root@gfs-node01 etc]# cat hosts # Do not remove the following line, or various programs # that require network functionality will fail. #127.0.0.1 gfs-node01 localhost.localdomain localhost 192.168.10.1 gfs-node01 192.168.10.2 gfs-node02 192.168.10.3 gfs-node03 192.168.10.1 gnbd-server [root@gfs-node01 etc]#
备注:我把gnbs-server和node01放在了同一台server上,实际运行如果有条件的话中最好分开
三、在node-01上进行分区 #dmesg |grep scsi察看scsi设备,如下: [root@gfs-node01 ~]# dmesg|grep scsi scsi0 : ioc0: LSI53C1030, FwRev=00000000h, Ports=1, MaxQ=128, IRQ=169 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 说明认出了scsi设备,然后用fdisk进行了分区,注意,只进行分区,不要格式化,在这里我使用fdisk分了两个大小为3G的分区,分别为: /dev/sda1和/dev/sda2,如下: [root@gfs-node01 ~]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 1044 8281507+ 8e Linux LVM
Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/sda1 1 366 2939863+ 83 Linux /dev/sda2 367 732 2939895 83 Linux [root@gfs-node01&nbs[1] [2] [3] 下一页
 |
频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。
| 原始作者:佚名 |
录入时间:2007-1-3 3:55:05 |
| 信息来源:不详 |
投稿信箱:itqoo@126.com |
|
|
 |
|
|
|
| 教程录入:itqoo 责任编辑:itqoo |
|
上一个教程: Linux多媒体教程:Vmware完全实现心得
下一个教程: Linux系统的多媒体管理大师-Compupic |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |