Professional Documents
Culture Documents
4 (RHCS)
1
:
1
node1.sonic.com
10.100.20.1
2
node2.sonic.com
10.100.20.2
iscsi / iscsi.sonic.com
10.100.20.3
: Web Conga Cluster,
web (httpd).
:
Conga: Luci(,Server ) Ricci( Luci
,Agent), Luci ,Ricci Cluster
.
(Head-split): Cluster ,
,,
,.
Fence:, fence ,
,. Fence , IPMI .
PE2900 BMC Fence .
Cman:cluster manager,Cluster , cluster ,,,
.
Rgmanager:Resource group manager,Cluster ,
.
Failover domain: cluster failover .
2
cman
cman (cnxman)
(SM)
cman RHCS serivce /DLMGFSCLVM
Fence cman
rgmanager
rgmanager(Resource Group Manager) cman DLM cman rgmanager
RHCS serivce /rgmanager
Service() Resources() Failover
Service()
Failover Domain Resources()
Web Java
() IP
Failover Domain()
Failover Domain Node()Failover Domain
Service Service Failover
Node Failover Domain Node Service
"/()"
Resources()
Resources IP Service
IP
Fence
RHCS ""(
) Fence I/O
Fence
Fence "I/O
""" I/O I/O
()
YUM
1 CDROM
#mkdir /rhel6
#mount /dev/sr0 /rhel6
2 repo
# cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel6.repo
3 rhel6.repo
# vi /etc/yum.repos.d/rhel-source.repo
3
rhel6.repo
5 HA
# yum install cluster-glue resource-agents pacemaker
# yum install luci ricci cman
utils
RHEL6 HA
1 hosts
#vim /etc/hosts
2 HA
# service luci start
# service ricci start
# service rgmanager start
4
4 ricci
passwd ricci ricci ricci root
# passwd ricci
ricci
1 HA
Firefox
https://128.1.1.202:8084/
root
2
4 fence
fence
Fence
ip
5
2 down
1
2.
message
/var/log/cluster/..
(tail f)
mountIP
Tail f /var/log/message
clustat HA
# clustat
HA
# tail -f /var/log/cluster/rgmanager.log
ORACLE
# ps -ef | grep ora
++++++++++ +++++
+++
RHCS
RHCS cman rgmanager
service cman start
service rgmanager start
cman rgmanager cman
rgmanager
RHCS
RHCS
service rgmanager stop
service cman stop
rgmanager rgmanager cman
cman GFS2
rgmanager
clusvcadm
1.
Service
Node
web1 webserver
[root@web1 ~]# clusvcadm -e webserver -m web1
Member web1 trying to enable service:webserver...Success
service:webserver is now running on web1
/var/log/messages webserver IP
2.
3.
4.
web1 web2
[root@web1 ~]# clusvcadm -r webserver -m web2
Trying to relocate service:webserver to web2...Success
service:webserver is now running on web2
RHCS
RHCS RHCS
cman_toolclustatccs_tool
1. cman_tool
cman_tool
cman_tool <join|leave|kill|expected|votes|version|wait|status|nodes|services|debug> [options]
10
[root@web1 ~]#clustat -i 3
Cluster Status for mycluster @ Mon Aug 23 18:54:15 2010
Member Status: Quorate
Member Name ID Status
------ ---- ---- -----web2 1 Online, rgmanager
Mysql1 2 Online, rgmanager
Mysql2 3 Online, rgmanager
web1 4 Online, Local, rgmanager
/dev/sdb7 0 Online, Quorum Disk
Service Name Owner (Last) State
11
clustat -i-i 3
Online
Offlinestarted Mysql1 web1
ID web2 Node 1web1 Node 4
3. ccs_tool
ccs_tool cluster.conf ccs_tool // fence
ccs_tool
ccs_tool update
[root@web1 cluster]# ccs_tool update /etc/cluster/cluster.conf
Proposed updated config file does not have greater version number.
Current config_version :: 35
Proposed config_version:: 35
Failed to update config file.
ccs_tool cluster.conf config_version cluster.conf cluster.conf
config_version ccs_tool
[root@web1 cluster]# ccs_tool update /etc/cluster/cluster.conf
Config file updated from version 35 to 36
Update complete.
GFS2
GFS2 gfs2_fsckgfs2_toolgfs2_jaddgfs2_quotagfs2_convert
1. gfs2_fsck
ext3 fsck.ext3 GFS2 fsck.gfs2 gfs2_fsck
gfs2_fsck
gfs2_fsck [-afhnpqvVy] <device>
12
Pass1c complete
Pass5 complete
gfs2_fsck complete
2. gfs2_tool
gfs2_tool GFS2
1 GFS2
[root@web1 ~]# gfs2_tool df /gfs2
/gfs2:
SB lock proto = "lock_dlm"
SB lock table = "mycluster:my-gfs2"
SB ondisk format = 1801
SB multihost format = 1900
Block size = 4096
Journals = 4
Resource Groups = 19
Mounted lock proto = "lock_dlm"
Mounted lock table = "mycluster:my-gfs2"
Mounted host data = "jid=2:id=65539:first=0"
Journal number = 2
Lock module flags = 0
Local flocks = FALSE
Local caching = FALSE
2gfs2_tool
2 GFS2
[root@node1 gfs2]# gfs2_tool freeze /gfs2
[root@node1 gfs2]# gfs2_tool unfreeze /gfs2
GFS2
3 GFS2
[root@web1 ~]# gfs2_tool journals /gfs2
journal2 - 128MB
journal3 - 128MB
journal1 - 128MB
journal0 - 128MB
4 journal(s) found.
4 journal 128M
13
4 GFS2
[root@web1 ~]# gfs2_tool version
gfs2_tool 0.1.62 (built Mar 31 2010 07:34:25)
Copyright (C) Red Hat, Inc. 2004-2006 All rights reserved
3gfs2-jadd
gfs2-jadd GFS2 Journals
gfs2_jadd [-cDhJjqV] /path/to/filesystem
Journals 64M
[root@Mysql1 ~]# gfs2_jadd -J 64M
GFS2 5
[root@Mysql1 ~]# gfs2_jadd -j 5 /gfs2
gfs2_quota GFS2 gfs2_convert GFS
GFS2
14
Linux
1 iSCSI
yum install iscsi-initiator-utils
yum install iscsi-initiator-utils-devel
#RHEL
15
IP 192.168.6.251
umount /raid
3 Linux
16
(
Linux )
Logout Umount
GFS2
1. cman
2. NOde1 Node2 iscsi login
3. Node1:
cman_tool status|grep Name # cluster name
Cluster Name: cluster
gfs
#-j 2 client
Node2:
mount -t gfs2 /dev/sdb1 /mnt
4 Node1 Node2
17
vi /etc/fstab
/dev/sdb1
/mnt
/etc/init.d/gfs2 start
chkconfig
chkconfig
chkconfig
chkconfig
chkconfig
chkconfig
gfs2
defaults
#/mnt
0 0
cman on
rgmanager on
ricci on
modclusterd on
clvmd on
gfs2 on
18