2 新增standby master

murkey發表於2020-04-19

--------- 增加 master mirror----------

smdw root 執行

mkdir -p /greenplum/gpdata/master

chown gpadmin:gpadmin /greenplum/gpdata/master

 

 

修改 hosts 檔案

 

10.102.254.24           sdw1

10.102.254.25           sdw2

10.102.254.26           sdw3 smdw

10.102.254.27           mdw

 

 

 

mdw gpadmin 執行

gpinitstandby -s smdw

 

[gpadmin@mdw ~]$ gpinitstandby -s smdw

20200419:00:58:17:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Validating environment and parameters for standby initialization...

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Checking for filespace directory /greenplum/gpdata/master/gpseg-1 on smdw

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master initialization parameters

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master hostname               = mdw

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master data directory         = /greenplum/gpdata/master/gpseg-1

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master port                   = 5432

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master hostname       = smdw

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master port           = 5432

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master data directory = /greenplum/gpdata/master/gpseg-1

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum update system catalog         = On

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:- Filespace locations

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------

20200419:00:58:18:002040 gpinitstandby:mdw:gpadmin-[INFO]:-pg_system -> /greenplum/gpdata/master/gpseg-1

Do you want to continue with standby master initialization? Yy|Nn (default=N):

> y

20200419:00:58:34:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Syncing Greenplum Database extensions to standby

20200419:00:58:35:002040 gpinitstandby:mdw:gpadmin-[INFO]:-The packages on smdw are consistent.

20200419:00:58:35:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Adding standby master to catalog...

20200419:00:58:35:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Database catalog updated successfully.

20200419:00:58:35:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Updating pg_hba.conf file...

20200419:00:58:36:002040 gpinitstandby:mdw:gpadmin-[INFO]:-pg_hba.conf files updated successfully.

20200419:00:58:38:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Updating filespace flat files...

20200419:00:58:38:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Filespace flat file updated successfully.

20200419:00:58:38:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Starting standby master

20200419:00:58:38:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Checking if standby master is running on host: smdw  in directory: /greenplum/gpdata/master/gpseg-1

20200419:00:58:38:002040 gpinitstandby:mdw:gpadmin-[WARNING]:-Unable to cleanup previously started standby: 'Warning: the ECDSA host key for 'smdw' differs from the key for the IP address '10.102.254.26'

Offending key for IP in /home/gpadmin/.ssh/known_hosts:1

Matching host key in /home/gpadmin/.ssh/known_hosts:9

'

20200419:00:58:40:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files...

20200419:00:58:40:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully.

20200419:00:58:40:002040 gpinitstandby:mdw:gpadmin-[INFO]:-Successfully created standby master on smdw


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/500314/viewspace-2687055/,如需轉載,請註明出處,否則將追究法律責任。

相關文章