当前位置:网站首页>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
边栏推荐
- Origin and development of philosophy Hegel external historical form
- Grpc sets connection lifetime and server health check
- Jsonp solves cross domain plug-ins (JS, TS)
- 6-11 vulnerability exploitation - use the built environment to send emails
- R language uses logistic regression, ANOVA, outlier analysis and visual classification iris iris data set
- Industrial control safety PLC firmware reverse III
- How can arm access the Internet through a laptop?
- Start to build a three node Eureka cluster
- Management mode of agricultural science data center based on life cycle theory
- Web vulnerability
猜你喜欢
![[hero planet July training leetcode problem solving daily] 20th BST](/img/25/2d2a05374b0cf85cf123f408c48fe2.png)
[hero planet July training leetcode problem solving daily] 20th BST

Detailed explanation of manually writing servlet in idea

Multithreading and high concurrency (II) -- synchronized locking and unlocking process

Consul cluster deployment

2022/7/18-7/19

Genesis, the world's first "consumption investment" public chain, was invited to participate in consensus 2022

Yunyuanyuan (VIII) | Devops in depth Devops

Hcip - BGP - border gateway protocol

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

Beijing Zhun electric clock, Beidou clock server, GPS network time server, NTP satellite timing system
随机推荐
Guide to the construction of network security testing laboratory - Chapter 1, section 1.5 key terms
Using multithreaded execution method in Lua script based on nlua implementation
Agreement on sharing agricultural scientific data in China
1260. Two dimensional grid migration: simple construction simulation problem
Grpc sets connection lifetime and server health check
Solution to the occupation of project startup port
After upgrading v2.1.0, the synchronization failed
Thinkphp5.0.24 deserialization chain analysis
I was forced to graduate by a big factory and recited the eight part essay in a two-month window. Fortunately, I went ashore, otherwise I wouldn't be able to repay the mortgage
Experienced the troubleshooting and solution process of an online CPU100% and the application of oom
Research and application of scientific data management strategy for high energy synchrotron radiation source
Industrial control safety PLC firmware reverse II
Jenkins configuration plug-in interface displays "suggestions collection" in Chinese
Application status of typical marine environmental observation data products and Its Enlightenment to China
KVM virtualization jobs
What do growth enterprises need most to build a data-driven organization?
Cloudrev deploy your own public cloud disk (pagoda installation method)
Redis tutorial
Deamnet|filenotfounderror: [winerror 3] the system cannot find the specified path.: '/ Datasettest\\Set12‘
Several application scenarios of NAT