GreenPlum集群给主节点安装备节点
作者:互联网
1. 创建目录 主需要创建gpmaster,其他的备用
[gpadmin@smdw gpdata]$ mkdir -p /data01/gpdata/gpmaster [gpadmin@smdw gpdata]$ mkdir -p /data01/gpdata/gpdatap1 [gpadmin@smdw gpdata]$ mkdir -p /data01/gpdata/gpdatap2 [gpadmin@smdw gpdata]$ mkdir -p /data01/gpdata/gpdatam1 [gpadmin@smdw gpdata]$ mkdir -p /data01/gpdata/gpdatam2
2. 所有节点配置好
[gpadmin@smdw gpdata]$ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.10.10.101 vhost1 mdw 10.10.10.102 vhost2 sdw1 10.10.10.103 vhost3 sdw2 10.10.10.104 vhost4 sdw3 10.10.10.105 vhost5 smdw [gpadmin@smdw gpdata]$
3. 执行
[gpadmin@mdw ~]$ gpinitstandby -s smdw 20210216:18:12:45:035019 gpinitstandby:mdw:gpadmin-[INFO]:-Validating environment and parameters for standby initialization... 20210216:18:12:45:035019 gpinitstandby:mdw:gpadmin-[ERROR]:-Parent directory /data01/gpdata/gpmaster does not exist on host smdw 20210216:18:12:45:035019 gpinitstandby:mdw:gpadmin-[ERROR]:-This directory must be created before running gpactivatestandby 20210216:18:12:45:035019 gpinitstandby:mdw:gpadmin-[ERROR]:-Failed to create standby 20210216:18:12:45:035019 gpinitstandby:mdw:gpadmin-[ERROR]:-Error initializing standby master: Parent directory /data01/gpdata/gpmaster does not exist [gpadmin@mdw ~]$ gpinitstandby -s smdw 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Validating environment and parameters for standby initialization... 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Checking for data directory /data01/gpdata/gpmaster/gpseg-1 on smdw 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------ 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master initialization parameters 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:------------------------------------------------------ 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master hostname = mdw 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master data directory = /data01/gpdata/gpmaster/gpseg-1 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum master port = 5432 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master hostname = smdw 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master port = 5432 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum standby master data directory = /data01/gpdata/gpmaster/gpseg-1 20210216:18:13:48:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Greenplum update system catalog = On Do you want to continue with standby master initialization? Yy|Nn (default=N): > y 20210216:18:13:51:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Syncing Greenplum Database extensions to standby 20210216:18:13:51:035035 gpinitstandby:mdw:gpadmin-[INFO]:-The packages on smdw are consistent. 20210216:18:13:51:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Adding standby master to catalog... 20210216:18:13:51:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Database catalog updated successfully. 20210216:18:13:51:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Updating pg_hba.conf file... 20210216:18:13:52:035035 gpinitstandby:mdw:gpadmin-[INFO]:-pg_hba.conf files updated successfully. 20210216:18:13:54:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Starting standby master 20210216:18:13:54:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Checking if standby master is running on host: smdw in directory: /data01/gpdata/gpmaster/gpseg-1 20210216:18:13:56:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files... 20210216:18:13:57:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully. 20210216:18:13:57:035035 gpinitstandby:mdw:gpadmin-[INFO]:-Successfully created standby master on smdw [gpadmin@mdw ~]$
标签:INFO,18,GreenPlum,gpadmin,节点,集群,gpinitstandby,mdw,20210216 来源: https://blog.51cto.com/lishiyan/2629664