2、 RHCS集群配置(test001)
此部分的配置要在所有的节点操作,这里给出节点test001的操作,test002,test003的操作与test001的一样。
2.1、 Yum配置(test001)
将rhel5.8光盘挂在在/mnt下面
|
1
|
[root@test001 ~]#mount –o loop rhel5.8.iso /mnt |
在/etc/yum.repos.d/目录下新建rhel.repo文件,
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
[root@test003 ~]# vim /etc/yum.repos.d/rhel.repo[rhel]name=rhelbaseurl=file:///mnt/Servergpgcheck=0[storage]name=storagebaseurl=file:///mnt/ClusterStoragegpgcheck=0[cluster]name=clusterbaseurl=file:///mnt/Clustergpgcheck=0 |
2.2、 RHEL5.8集群软件安装(test001)
2.2.1、 安装clustering
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
[root@test001 ~]# yum groupinstallClusteringLoaded plugins: katello, product-id,security, subscription-managerUpdating certificate-based repositories.Unable to read consumer identitySetting up Group ProcessResolving Dependencies--> Running transaction check…………Installed: Cluster_Administration-en-US.noarch 0:5.8-1.el5 cluster-cim.x86_64 0:0.12.1-7.el5 cluster-snmp.x86_64 0:0.12.1-7.el5 ipvsadm.x86_64 0:1.24-13.el5 luci.x86_64 0:0.12.2-51.el5 modcluster.x86_64 0:0.12.1-7.el5 piranha.x86_64 0:0.8.4-24.el5 rgmanager.x86_64 0:2.0.52-28.el5 ricci.x86_64 0:0.12.2-51.el5 system-config-cluster.noarch 0:1.0.57-12 Dependency Installed: cman.x86_64 0:2.0.115-96.el5 net-snmp.x86_64 1:5.3.2.2-17.el5 oddjob.x86_64 0:0.27-12.el5 oddjob-libs.x86_64 0:0.27-12.el5 openais.x86_64 0:0.80.6-36.el5 perl-Net-Telnet.noarch 0:3.03-5 perl-XML-LibXML.x86_64 0:1.58-6 perl-XML-LibXML-Common.x86_64 0:0.13-8.2.2 perl-XML-NamespaceSupport.noarch 0:1.09-1.2.1 perl-XML-SAX.noarch 0:0.14-11 pexpect.noarch 0:2.3-3.el5 Python-imaging.x86_64 0:1.1.5-7.el5 python-pycurl.x86_64 0:7.15.5.1-8.el5 python-suds.noarch 0:0.4.1-2.el5 tix.x86_64 1:8.4.0-11.fc6 tkinter.x86_64 0:2.4.3-46.el5 tog-pegasus.x86_64 2:2.11.0-3.el5 tog-pegasus-libs.x86_64 2:2.11.0-3.el5 Complete! |
2.2.2、 安装逻辑卷集群包lvm2-cluster
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@test001 ~]# yum -y installlvm2-clusterLoaded plugins: katello, product-id,security, subscription-managerUpdating certificate-based repositories.Unable to read consumer identitySetting up Install ProcessResolving Dependencies--> Running transaction check……Installing: lvm2-cluster x86_64 2.02.88-7.el5 storage 301 kInstalled: lvm2-cluster.x86_64 0:2.02.88-7.el5 Complete!启动集群功能:[root@test001 ~]# lvmconf --enable-cluster |
注意:保证第二节部分(test001节点)的操作步骤,其他两节点(test002,test003)都做了。
2.2.3、 配置仲裁盘
rhcs仲裁盘一定要用裸设备制作,不能给lvm管理做成逻辑卷,而且这个仲裁盘必须是共享磁盘,可以是san共享存储或其他的共享磁盘才可以,满足这几个条件才能做。在任意节点制作都可以:
2.2.3.1格式化分区
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
[root@test001 ~]# fdisk /dev/hdaDevice contains neither a valid DOSpartition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes willremain in memory only,until you decide to write them. After that,of course, the previouscontent won't be recoverable.Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)Command (m for help): pDisk /dev/hda: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cylindersUnits = cylinders of 16065 * 512 = 8225280bytes Device Boot Start End Blocks Id SystemCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-261, default 1):Using default value 1Last cylinder or +size or +sizeM or +sizeK(1-261, default 261): +20MCommand (m for help): pDisk /dev/hda: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cylindersUnits = cylinders of 16065 * 512 = 8225280bytes Device Boot Start End Blocks Id System/dev/hda1 1 3 24066 83 LinuxCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[root@test001 ~]# partprobe |
2.2.3.2 制作仲裁盘
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
[root@test001 ~]# mkqdisk -c /dev/hda1 -lqdisk01mkqdisk v0.6.0Writing new quorum disk label 'qdisk01' to/dev/hda1.WARNING: About to destroy all data on/dev/hda1; proceed [N/y] ? yInitializing status block for node 1...Initializing status block for node 2...Initializing status block for node 3...Initializing status block for node 4...Initializing status block for node 5...Initializing status block for node 6...Initializing status block for node 7...Initializing status block for node 8...Initializing status block for node 9...Initializing status block for node 10...Initializing status block for node 11...Initializing status block for node 12...Initializing status block for node 13...Initializing status block for node 14...Initializing status block for node 15...Initializing status block for node 16... |
2.2.3.3 查看仲裁盘状态:
|
1
2
3
4
5
6
7
8
9
10
11
|
[root@test001 ~]# mkqdisk –L mkqdisk v0.6.0/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1:/dev/disk/by-path/pci-0000:00:01.1-ide-0:0-part1:/dev/hda1: Magic: eb7a62c2 Label: qdisk01 Created: Wed Apr 24 21:03:56 2013 Host: test001 KernelSector Size: 512 RecordedSector Size: 512 |
在剩下的所有节点运行:
|
1
2
|
[root@test002 ~]# partprobe[root@test003 ~]# partprobe |
