greenplum add mirror to master
This article is to add standby master node greenplum existing system, if the system did not install gp, gp install the system documentation for installation instructions please refer greenplum
-
Enable master image
that can be used to add gpinitsystem when greenplum system initialization, this paper is mainly to add standby master greenplum Existing System -
Adding a standby master system to an existing gp
system parameters, please "System Configuration" in accordance with the installation instructions in greenplum
2.1 greenplum install software standby node
installation 2.1.1 Binary
root]# unzip greenplum-db-<version>-<platform>.zip
root]# /bin/bash greenplum-db-<version>-<platform>.bin
Enter all default
root]# chown -R gpadmin /usr/local/greenplum*
root]# chgrp -R gpadmin /usr/local/greenplum*
2.1.2 Use gpadmin user logon master node, ssh-free exchange of confidential documents
gpdmin]$ gpssh-exkeys -f hostfile_all
gpdmin]$ cat hostfile_all
LOCAL-81-67
LOCAL-81-68
LOCAL-81-69
LOCAL-81-70
LOCAL-192-168-97-63.boyaa.com
3 Initialize the master STANDBY
3.1 users log on using a master node gpadmin greenplum system
3.2 gpinitstandby initialization gp standby node
gpdmin]$ gpinitstandby -s LOCAL-192-168-97-63.boyaa.com
Note: -s represents the directory must be used with master node directory specified hostname standby node remains consistent
Check the standby state of the node 4
[gpadmin@LOCAL-81-67 ~]$ psql -c 'SELECT procpid, state FROM pg_stat_replication;'
procpid | state
---------+-----------
1750 | streaming
It indicates normal synchronous state is streaming
greenplum add mirror to segment
there is a way that after initialization, and then add a mirror, record here the steps
needed attention to the fact that : greenplum currently only allows the addition of mirror, and can not be deleted mirror, so before adding a mirror, it is best to do some backup gp
create mirrored storage directory: