Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

New standby node added to greenplum cluster

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Greenplum adds standby separately

This article focuses on how to add Standby to Master nodes that do not do Standby. (quick finishing version)

The old version of gp cluster needs to pay attention to!

In the process of building a Standby for a Master node, GreenPlum automatically closes the database and opens the Master node in utility mode, then modifies the information of adding Standby in the gp_segment_configuration dictionary, then closes the Master node, copies the Master data to the Standby node, and finally starts the database. Therefore, when adding Standby to the Master node, it needs to be done during the idle period, otherwise the business will be affected.

Adding a new node requires the following:

Reference Information:

Https://blog.51cto.com/michaelkang/2167195

1: create a new gp user, and the user id keeps with the cluster node all the time; 2: create a new data directory, chown gpadmin.gpadmin $DIR;3: the hosts files of all hosts in the cluster (Master node and all Segment nodes) need to add the information of the Standby host. 4: complete system initialization (disable firewall, selinux, sysctl.conf, limits.conf...), refer to greenplum cluster installation initialization installation steps; 5: directly get through master node ssh non-secret login newly added standby; 6:standby node ssh non-secret login cluster other nodes, through the gpssh tool test 7: install greenplum package 8: check the permissions of the newly added standby node installation directory, chown gpadmin.gpadmin $DIR9: set the environment variable of the standby node gpadmin account to make it effective; after confirming the configuration above: 10. Add the Standby in the Master node with the gpinitstandby command. (executed by gpadmin user) [gpadmin@mdw config] $gpinitstandby-s standby-node operation example: [gpadmin@kangjianhua-6-16 ~] $gpinitstandby-s kangjianhua-6-15.ptmind.comgpadmin-[INFO]:-Validating environment and parameters for standby initialization...gpadmin- [INFO]:-Checking for filespace directory / usr/local/gpdata/gpmaster/gpseg-1 on kangjianhua-6-15.ptmind.comgpadmin-[INFO]:- -- gpadmin- [INFO]:-Greenplum standby master initialization parametersgpadmin- [INFO]:-gpadmin- [INFO]:-Greenplum master hostname = kangjianhua- 6-16.ptmind.comgpadmin-[INFO]:-Greenplum master data directory = / usr/local/gpdata/gpmaster/gpseg-1gpadmin- [INFO]:-Greenplum master port = 5432gpadmin-[INFO]:-Greenplum standby master hostname = kangjianhua-6-15.ptmind.comgpadmin-[INFO]:-Greenplum standby master port = 5432gpadmin-[INFO]:-Greenplum standby master data directory = / usr/local/gpdata/gpmaster/gpseg-1gpadmin- [INFO]:-Greenplum update system catalog = Ongpadmin- [INFO]:- -gpadmin- [INFO]:-Filespace locationsgpadmin- [INFO]:-gpadmin- [INFO ]:-pg_system-> / usr/local/gpdata/gpmaster/gpseg-1Do you want to continue with standby master initialization? Yy | Nn (default=N): > ygpadmin- [INFO]:-Syncing Greenplum Database extensions to standbygpadmin- [INFO]:-The packages on kangjianhua-6-15.ptmind.com are consistent.gpadmin- [INFO]:-Adding standby master to catalog...gpadmin- [INFO]:-Database catalog updated successfully.gpadmin- [INFO]:-Updating pg_hba.conf file...gpadmin- [INFO]:-pg_hba.conf files updated successfully.gpadmin- [INFO]:-Updating filespace flat files...gpadmin- [INFO]: -Filespace flat file updated successfully.gpadmin- [INFO]:-Starting standby mastergpadmin- [INFO]:-Checking if standby master is running on host: kangjianhua-6-15.ptmind.com in directory: / usr/local/gpdata/gpmaster/gpseg-120181115:18:06:06:176421 gpinitstandby:kangjianhua-6-16 Starting standby mastergpadmin- gpadmin-[WARNING]:-Unable to cleanup previously started standby: 20181115 18 Starting standby mastergpadmin- 07 gpinitstandby:kangjianhua-6-16 purge gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files ... = 'class1' > 20181115 Backup files of pg_hba.conf cleaned up successfully.20181115:18:06:08:176421 gpinitstandby:kangjianhua-6 18 Successfully created standby master on kangjianhua-6 06 gpinitstandby:kangjianhua-6 0864 21 gpadmin-[INFO]:-gpadmin-16 INFO:-gpadmin-15.ptmind.comgpcc:

After the greenplum master node is migrated, the configuration of the gpcc node needs to modify the gpcc connection node pointing to the new master address:

After switching the gp cluster master, you need to modify:

/ usr/local/gpcc/greenplum-cc-web-4.3.1/confcp app.conf app.conf.bakvim app.confo [gpadmin @ kangjianhua-6-16 conf] $more app.confappname = gpccwslistentcp4 = truerunmode = prodsession = truexsrfexpire = 2592000xsrfkey = 61oETzKXQAGaYdkLxxxxxxxxxxxxxxrendertype = jsonprintallsqls = falsemaster_port = 5432path = / usr/local/gpccdisplay_name = gpccenable_kerberos = falseEnableHTTPS = falseEnableHTTP = truehttpport = 8899master_host = kangjianhua-6-15.ptmind.com = > kangjianhua-6-16.ptmind.com (new master) "" = modify content View status: gpcc status start Service: gpcc start# View Service process: ps-ef | grep ccagent/usr/local/gpcc/greenplum-cc-web-4.3.1/bin/ccagent-udpport 9898-rpcaddr kangjianhua-6-15.ptmind.com:8899 installation reference: https://blog.51cto.com/michaelkang/2170631

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report