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

RHCS多节点部署应用企业环境

[日期:2013-05-18] 来源:51cto  作者:kikupotter [字体:大 中 小]

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=rhel
baseurl=file:///mnt/Server
gpgcheck=0
[storage]
name=storage
baseurl=file:///mnt/ClusterStorage
gpgcheck=0
[cluster]
name=cluster
baseurl=file:///mnt/Cluster
gpgcheck=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 groupinstallClustering
Loaded plugins: katello, product-id,security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Group Process
Resolving 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-cluster
Loaded plugins: katello, product-id,security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
……
Installing:
lvm2-cluster x86_64 2.02.88-7.el5 storage 301 k
Installed:
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/hda
Device contains neither a valid DOSpartition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes willremain in memory only,
until you decide to write them. After that,of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partitiontable 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/hda: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK(1-261, default 261): +20M
Command (m for help): p
Disk /dev/hda: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 3 24066 83 Linux
Command (m for help): w
The 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 -lqdisk01
mkqdisk v0.6.0
Writing new quorum disk label 'qdisk01' to/dev/hda1.
WARNING: About to destroy all data on/dev/hda1; proceed [N/y] ? y
Initializing 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
linux
相关资讯       RHCS  节点 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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