Linux Cluster Erection--rhcs

Source: Internet
Author: User
Tags apc failover

rhcs:red hat Cluster Suite Red Hat cluster kit,

Trinity, a complete cluster application solution
1. Load Balancing
2. High Availability
3. Shared storage File System


Composition
1. Cluster Manager: CMAN

Profile Management: CCS---/SBIN/CCSD
/etc/cluster/cluster.conf

Cman---/usr/sbin/cman_tool

Voting disk: More than half of the cluster votes will work properly for GFS file system to be used
Quorum: Number of legal nodes: nodes *vote+qdisk
Quorate: Reach the legal node point
<
/sbin/service QDISKD Start

Backstage Daemons:
/sbin/groupd
/sbin/fenced
Lock Management Dlm/sbin/dlm_controld
/sbin/gfs_controld

Gate Device: Block when the node is down unexpectedly, turn off the node, GFS2 cannot read and write Fence--/sbin/fence_tool
FENCE_XVMD---/SBIN/FENCE_XVMD

2. Service Explorer: Rgmannager---
/usr/sbin/clurgmgrd
/usr/sbin/clustat
/usr/sbin/clusvcadm
/usr/sbin/clubufflush
/usr/sbin/clufindhostname
/usr/sbin/clulog
/usr/sbin/clunfslock
/usr/sbin/clurmtabd
/usr/sbin/rg_test
/usr/sbin/rhev-check.sh

3. Configuration Management tools:

Graphical Web configuration: Conga:luci and Ricci

Tool Configuration:
Clustat
Cman_tool
Ccs_tool
Fence_tool
Clusvcadm

4.gfs:redhat company cluster file system, installation and use need RHCH support. Through the lock mechanism, a file system can be mounted for multiple hosts and can be read and written simultaneously.

5: Other: CLVM cluster logical volume management, ISCSI


------------the cluster installation deployment----------


Shared Disk side:
1. Install iSCSI Target
Service TGTD Start

2. Install Luci:
luci-0.12.2-51.el5.centos.x86_64.rpm

Luci_admin Init

Service Luci Start

3. Modify/etc/hosts
192.168.12.132 Web1
192.168.12.133 WEB2
192.168.12.231 MYSQL1
192.168.12.232 MYSQL2


Node:
1. Install the RHCS kit:
RPM-IVH perl-xml-namespacesupport-1.09-1.2.1.noarch.rpm
RPM-IVH perl-xml-sax-0.14-11.noarch.rpm
RPM-IVH perl-xml-libxml-common-0.13-8.2.2.x86_64.rpm
RPM-IVH perl-xml-libxml-1.58-6.x86_64.rpm
RPM-IVH perl-net-telnet-3.03-5.noarch.rpm
RPM-IVH pexpect-2.3-3.el5.noarch.rpm
RPM-IVH openais-0.80.6-36.el5.x86_64.rpm
RPM-IVH python-pycurl-5.5.1-8.el5.x86_64.rpm
RPM-IVH python-suds-0.4.1-2.el5.noarch.rpm
RPM-IVH cman-2.0.115-96.el5.x86_64.rpm
RPM-IVH modcluster-0.12.1-7.el5.centos.x86_64.rpm
RPM-IVH ricci-0.12.2-51.el5.centos.x86_64.rpm
RPM-IVH gfs2-utils-0.1.62-34.el5.x86_64.rpm
RPM-IVH rgmanager-2.0.52-28.el5.centos.x86_64.rpm

2. Installing iSCSI Initiator
Iscsiadm-m discovery-t sendtargets-p 192.168.12.246
Service iSCSI Start

3. Configure/etc/cluster/cluster.conf
Configurable via Luci:
1. Create a cluster, add nodes
2. Create Failover Domain
3. Create Resources
IP Address
Httpscript---/etc/init.d/httpd
EXT-FS---/WEBDATA/DEV/SDB6
4. Create service, add resource, select failed transfer domain

5. Configuring the Storage Cluster GFs
Fdisk/dev/sdb

Mkfs.gfs2-p lock_dlm-t mucluster:my-gfs2-j 4/DEV/SDB5
Mount.gfs2/dev/sdb5/gfs2-v

6. Configure the voting disk:
Mkqdisk-c/dev/sdb7-l Myqdisk Creating a shared disk (no formatting required)
Mkqdisk-l displaying shared disk information
Add Quarum Partition to the Web interface
Service QDISKD Start QDISKD Services

7. Configuring the fence grid device

After the configuration is complete:/etc/cluster/cluster.conf
<?xml version= "1.0"?>
<cluster alias= "mycluster" config_version= "8" name= "Mycluster" >
<fence_daemon clean_start= "0" post_fail_delay= "0" post_join_delay= "3"/>
<clusternodes>
<clusternode name= "Web2" nodeid= "1" votes= "1" >
<fence/>
</clusternode>
<clusternode name= "Web1" nodeid= "2" votes= "1" >
<fence/>
</clusternode>
</clusternodes>
<cman expected_votes= "1" two_node= "1"/>
<fencedevices/>
<rm>
<failoverdomains>
<failoverdomain name= "Webserver-failover" nofailback= "0" ordered= "1" restricted= "1" >
<failoverdomainnode name= "Web2" priority= "ten"/>
<failoverdomainnode name= "Web1" priority= "1"/>
</failoverdomain>
</failoverdomains>
<resources>
<ip address= "192.168.12.233" monitor_link= "1"/>
<script file= "/etc/init.d/httpd" name= "Httpscript"/>
<fs device= "/DEV/SDB6" force_fsck= "1" force_unmount= "1" fsid= "7108" fstype= "ext3" mountpoint= "/webdata" Name= " Ext3-fs "self_fence=" 1 "/>
</resources>
<service autostart= "1" domain= "Webserver-failover" exclusive= "0" name= "webserver" recovery= "relocate" >
<ip ref= "192.168.12.233"/>
<script ref= "Httpscript"/>
</service>
</rm>
&LT;QUORUMD device= "/dev/sdb7" interval= "2" min_score= "1" tko= "Ten" votes= "2" >
</quorumd>
</cluster>


----------Cluster Management------------
Start the cluster:
Service Cman Start
Service Rgmanager Start

To close a cluster:
Service Rgmanager Stop
Service Cman Stop

Management Services:
Clusvcadm-e webserver-m web1 Start a node service
Clusvcadm-s webserver-m web1 Services to shut down a node
Clusvcadm-r webserver-m web1 Restart the node service

Clusvcadm-r webserver-m web2 Switching node service

Monitor cluster status

Cman_tool nodes-a
Cman_tool status

Clustat-i 3 Refresh cluster status every 3 seconds

Css_tool update/etc/cluster/cluster.conf Update configuration after modifying configuration
(According to Config_version to determine whether the update)

Configuring the Cluster
Css_tool Create Mycluster
Css_tool addfence APC FENCE_APC ipaddr=apc.domain.net USER=APC Password =APC
Ccc_tool AddNode node1-n 1-f APC prot=1
Csstool AddNode node2-n 2-f APC port=2
Ccs_tool AddNode node3-n 3-f APC port=3
Ccs_tool AddNode node4-n 4-f APC port=4

Managing the GFS2 File system
Gfs2_fsck-y/DEV/SDB5 Detect and Repair GFs file system errors
Gfs_tool DF/GFS2 viewing GFS2 file system mount details
Gfs_tool FREEZE/GFS2 locking GFS2 file system
Gfs_tool UNFREEZE/GFS2 Unlocking the GFS2 file system

Gfs2_tool JOURNALS/GFS2 Query GFS2 can mount node points

Gfs2_tool version Query GFS2 release information

Gfs2_jadd-j 64M journals size changed to 64M
Gfs2_jadd-j 5/GFS2 mount node changed to 5

------------Work Process---------------
Node normal shutdown:
1.QDISKD detected node shut down
2.openais processing
3.DLM close connection to this node
4.CLURGMGRD Resource Transfer

Normal boot:
Rejoin the cluster
Access to service resources


Node Abnormal outage:
Echo C>/proc/sysrq-trigger is a kernel crash
1.QDISKD detected node evicted
Openais processing
DLM close connection to this node
Fence process Isolation node, GFS2 cannot be used.
After the fence process isolation succeeds, GFS2 resumes.
CLRGMGRD Takeover Service

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.