当前位置:网站首页>HAC cluster is modified to stand-alone
HAC cluster is modified to stand-alone
2022-07-25 02:18:00 【Hangao PG Laboratory】
Henkel database
Catalog
Environmental Science
Document purpose
Details
Environmental Science
system platform :Linux x86 Red Hat Enterprise Linux 6
edition :4.5.7
Document purpose
This document is used to guide HAC Cluster is modified to stand-alone
Details
1、 Check cluster status , Use A、B There are two ways to judge
Method A: Use the cluster command , Make sure TL The timeline is consistent ,Lag in MB The data synchronization delay should not be too high , The best delay is 0.
[[email protected] ~]# hghactl list
+ Cluster: ha (7072256965608815760) -------+---------+----+-----------+
| Member | Host | Role | State | TL | Lag in MB |
+----------+---------------------+---------+---------+----+-----------+
| hghac228 | 192.168.80.228:5866 | Leader | running | 6 | |
| hghac230 | 192.168.80.230:5866 | Replica | running | 6 | 0 |
+----------+---------------------+---------+---------+----+-----------+
Method B: Each node queries the process , Yes sender The node is the main library , Yes receiver The node is a standby database
ps -ef | grep sender
root 26418 3233 0 6 month 11 ? 00:00:22 postgres: c: walsender sysdba 192.168.80.228(45186) streaming 0/16000000
ps -ef | grep receiver
root 3372 3348 0 6 month 11 ? 00:13:54 postgres: c: walreceiver streaming 0/16000000
2、 Other nodes of the cluster that are not stand-alone nodes stop 、 Ban hghac service
[[email protected] hgupload]# systemctl stop hghac.service
[[email protected] hgupload]# systemctl disable hghac.service
Removed symlink /etc/systemd/system/multi-user.target.wants/hghac.service.
Be careful :
Maybe not hghac.service, May be hghac-vip.service Please use systemctl status hghac.service/hghac-vip.service Determine which services are running
3、 The database modified as a stand-alone node stops 、 Ban hghac service , And set the database service to start automatically
[[email protected] hgupload]# systemctl stop hghac.service
[[email protected] hgupload]# systemctl disable hghac.service
Removed symlink /etc/systemd/system/multi-user.target.wants/hghac.service.
[[email protected] etc]# systemctl enable hgdb-see-4.5.7.service
4、 Modify the database as a stand-alone node, and check whether the database service starts automatically , And start the database
[[email protected] etc]# systemctl status hgdb-see-4.5.7.service
● hgdb-see-4.5.7.service - highgodb-4.5.7
Loaded: loaded (/usr/lib/systemd/system/hgdb-see-4.5.7.service; enabled; vendor preset: disabled)
Active: inactive (dead)
[[email protected] etc]# pg_ctl start
Wait for the server process to start ....2022-04-19 14:33:53 CST [21906]: [1-1] 625e57d1.5592 0 journal : data encryption performed by sm4
2022-04-19 14:33:53 CST [21906]: [2-1] 625e57d1.5592 0 journal : Password detection module is disabled
2022-04-19 14:33:53 CST [21906]: [3-1] 625e57d1.5592 0 journal : Starting HighGo Security Enterprise Edition Database System 4.5.7 on CentOS7 x86_64,build on 20220302
2022-04-19 14:33:53 CST [21906]: [4-1] 625e57d1.5592 0 journal : Monitoring IPv4 Address "0.0.0.0", port 5866
2022-04-19 14:33:53 CST [21906]: [5-1] 625e57d1.5592 0 journal : Monitoring IPv6 Address "::", port 5866
2022-04-19 14:33:53 CST [21906]: [6-1] 625e57d1.5592 0 journal : stay Unix Socket "/tmp/.s.PGSQL.5866" Listen on
2022-04-19 14:33:53 CST [21906]: [7-1] 625e57d1.5592 0 journal : Redirect log output to the log collection process
2022-04-19 14:33:53 CST [21906]: [8-1] 625e57d1.5592 0 Tips : Subsequent log output will appear in the directory "hgdb_log" in .
complete
The server process has started
5、 Stop and disable all nodes etcd service
systemctl stop etcd.service
systemctl disable etcd.service
6、 other
perform hghactl Wait for the cluster command prompt “ Command not found ”, Please configure the environment variable , Refer to the following :
vim ~/.bash_profile
export PGPORT=5866
export PGUSER=sysdba
export PGDATABASE=highgo
export PGHOME=/opt/HighGo4.5.7-see
export PGDATA=/opt/HighGo4.5.7-see/data
export PATH=$PGHOME/bin:$PATH:$HOME/bin:/opt/HighGo/tools/hghac:/opt/HighGo/tools/hghac/etcd
export LD_LIBRARY_PATH=$PGHOME/lib:/usr/lib64:$LD_LIBRARY_PATH
export ETCDCTL_ENDPOINTS=http://10.1.194.182:2379,http://10.1.194.191:2379,http://10.1.194.192:2379
export PATRONICTL_CONFIG_FILE=/opt/HighGo/tools/hghac/hghac-see.yaml
source ~/.bash_profile
Be careful :
1、 You need to modify the actual path of environment variables according to the actual situation , have access to find Command to find the file path
example : lookup hghac find / -iname hghac -print
2、ETCDCTL_ENDPOINTS Three ip It needs to be modified to configuration etcd Three node ip, You can refer to /opt/HighGo/tools/hghac/hghac-see.yaml In the document etcd:hosts
边栏推荐
- Using the artifact typora+picgo, Youdao cloud can automatically upload pictures in markdown without members
- Query the thread information of MySQL server (detailed explanation)
- The cloud ecology conference comes with the "peak"!
- Nacos service discovery data model
- Detailed explanation of manually writing servlet in idea
- Speed comparison between 64 bit width and 32 bit width of arm64 memory
- Scalar, vector, matrix calculus
- Inventory of well-known source code mall systems at home and abroad
- Apk packaging process
- Anacona has too many environments?? How to view your current environment in jupyter
猜你喜欢

iptables :chains, target

Jsonp solves cross domain plug-ins (JS, TS)
![[hero planet July training leetcode problem solving daily] 20th BST](/img/25/2d2a05374b0cf85cf123f408c48fe2.png)
[hero planet July training leetcode problem solving daily] 20th BST

Unable to display spline in UE4 (unreal engine4) terrain editing tool

Nacos service discovery data model

Data integration | what are the tools for data integration at home and abroad?
![ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience](/img/26/18fd3106f887f503479f081e29dac3.jpg)
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience

Google launched another "man grabbing war" for core making, and Intel's 17 year veteran joined!

Promise basic use

Example demonstration of "uncover the secrets of asp.net core 6 framework" [02]: application development based on routing, MVC and grpc
随机推荐
Hongmeng harmonyos 3 official announcement: officially released on July 27; Apple slowed down the recruitment and expenditure of some teams in 2023; Russia fined Google 2.6 billion yuan | geek headlin
Deep understanding of string class
Talk about what's going on with C # backstage GC?
Four redis cluster schemes you must know and their advantages and disadvantages
What are the important trends revealed by the release of "operator data viability index"?
DNA helped solve the outstanding case 30 years ago. The suspect strangled his girlfriend because he fell in love with his roommate. He was already the CEO of the technology company when he was arreste
Industrial control safety PLC firmware reverse II
When does MySQL use table locks and row locks?
Seven text editors that programmers should know are necessary for programming
BMW I3 based on clar architecture is not a simple "oil to electricity" product
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Data integration | what are the tools for data integration at home and abroad?
Rightmost × Microframe, high quality heif image coding and compression technology
Detailed explanation of manually writing servlet in idea
Query the thread information of MySQL server (detailed explanation)
Win10 configuring CUDA and cudnn
Research and application of scientific data management strategy for high energy synchrotron radiation source
Example demonstration of "uncover the secrets of asp.net core 6 framework" [02]: application development based on routing, MVC and grpc
It's still a synchronization problem
VRRP virtual redundancy protocol configuration