当前位置:网站首页>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
边栏推荐
- Jsonp solves cross domain plug-ins (JS, TS)
- How MySQL 8.0 based on TRX_ Id find the statement of the whole transaction
- It's still a synchronization problem
- Redis tutorial
- "No such plugin: cloudbees folder" solution appears when Jenkins selects the recommended plug-in for the first time
- Fraud detection using CSP
- Speed comparison between 64 bit width and 32 bit width of arm64 memory
- What do growth enterprises need most to build a data-driven organization?
- H5 common positioning function package
- Arthas case: dynamic update application logger level
猜你喜欢

Easy to master SSO single sign on, see this article

Vs2019 configuring Qt5 development environment
![[leetcode] 3. Longest substring without repeated characters - go language problem solution](/img/63/57d3557d77d44b51b7d0f71669568f.png)
[leetcode] 3. Longest substring without repeated characters - go language problem solution

"Nowadays, more than 99.9% of the code is garbage!"

Start to build a three node Eureka cluster

Example demonstration of "uncover the secrets of asp.net core 6 framework" [02]: application development based on routing, MVC and grpc

Simulate the implementation of strstr

Green low-carbon Tianyi cloud, a new engine of digital economy!

Digital power supply -- Chapter 1

Using multithreaded execution method in Lua script based on nlua implementation
随机推荐
The cloud ecology conference comes with the "peak"!
Completefuture parallel asynchronous return processing
MySQL advanced (13) command line export import database
Cloudrev deploy your own public cloud disk (pagoda installation method)
[hero planet July training leetcode problem solving daily] 20th BST
Agreement on sharing agricultural scientific data in China
When does MySQL use table locks and row locks?
Download files and web pages with WGet
Introduction to ORM framework - what is ORM framework?
Actf questions (dropper+master_of_dns)
Vs2019 configuring Qt5 development environment
Jedispoolconfig parameter configuration from the perspective of source code
Summary and sorting of XSS (cross site script attack) related content
Gerrit statistics script
Android memory optimized disk cache
Multithreading and high concurrency (II) -- synchronized locking and unlocking process
Gbase 8s how to query relational databases in sentences to select sample syntax and results of data from complex types
In the post deep learning era, where is the recommendation system going?
How can arm access the Internet through a laptop?
Cloud native platform, let edge applications play out!