Greenplum添加segment节点

注意:如果master配置了standby master,添加的segment必须要有mirror segment存在,否则报错。

查看某张表的数据分布情况

tutorial=# select gp_segment_id, count(*) from otp_r group by gp_segment_id;
 gp_segment_id |  count  
---------------+---------
             0 | 1024552
(1 row)


关闭iptablesselinux

root用户配置ssh互信

创建gpadmin用户

/usr/sbin/useradd gpadmin -d /home/gpadmin -s /bin/bash

gpadmin用户配置ssh互信

编辑new_hosts_file文件

该文件中仅包含新增节点主机名

创建inputfile

[gpadmin@hadoop02 ~]$ gpexpand -f new_hosts_file -D gpadmin
20160928:17:04:09:015501 gpexpand:hadoop02:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.8.1 build 1'
20160928:17:04:09:015501 gpexpand:hadoop02:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.8.1 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Apr 20 2016 08:08:56'
20160928:17:04:09:015501 gpexpand:hadoop02:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
 
System Expansion is used to add segments to an existing GPDB array.
gpexpand did not detect a System Expansion that is in progress.
 
Before initiating a System Expansion, you need to provision and burn-in
the new hardware.  Please be sure to run gpcheckperf/gpcheckos to make
sure the new hardware is working properly.
 
Please refer to the Admin Guide for more information.
 
Would you like to initiate a new System Expansion Yy|Nn (default=N):
> y
 
    By default, new hosts are configured with the same number of primary
    segments as existing hosts.  Optionally, you can increase the number
    of segments per host.
 
    For example, if existing hosts have two primary segments, entering a value
    of 2 will initialize two additional segments on existing hosts, and four
    segments on new hosts.  In addition, mirror segments will be added for
    these new primary segments if mirroring is enabled.
    
 
How many new primary segments per host do you want to add? (default=0):
>
 
Generating configuration file...
 
20160928:17:04:12:015501 gpexpand:hadoop02:gpadmin-[INFO]:-Generating input file...
 
Input configuration files were written to 'gpexpand_inputfile_20160928_170412' and 'None'.
Please review the file and make sure that it is correct then re-run
with: gpexpand -i gpexpand_inputfile_20160928_170412 -D gpadmin
                
20160928:17:04:12:015501 gpexpand:hadoop02:gpadmin-[INFO]:-Exiting...


 

使用input file添加节点

[gpadmin@hadoop02 ~]$ gpexpand -i gpexpand_inputfile_20160928_170412 -D gpadmin
20160928:17:04:49:015600 gpexpand:hadoop02:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.8.1 build 1'
20160928:17:04:49:015600 gpexpand:hadoop02:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.8.1 build 1) on x86_64-unknown-linux-gnu, compil
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值