MyException - 我的异常网
当前位置:我的异常网» 其他数据库 » greenplum装配札记(待完善)

greenplum装配札记(待完善)

www.MyException.Cn  网友分享于:2013-10-22  浏览:0次
greenplum安装札记(待完善)

1.安装配置

1.1硬件配置

硬件服务器用到某私有云中ip段为192.168.228.111-192.168.228.120的十台服务器,相关主要配置如下表:

 

类别

主机名

IP

内存

硬盘

主要目录

备注

Master

mdw

192.168.228.111

1.8G

50G

/usr/local

安装

/data/master

数据

Standby

smdw

192.168.228.112

1.8G

50G

/usr/local

安装

/data/master

数据

 

Segment1

 

sdw1

192.168.228.113

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment2

 

sdw2

192.168.228.114

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment3

 

sdw3

192.168.228.115

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment4

 

sdw4

192.168.228.116

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment5

 

sdw5

192.168.228.117

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment6

 

sdw6

192.168.228.118

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment7

 

sdw7

192.168.228.119

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

Segment8

 

sdw8

192.168.228.120

1.8G

1.9T

/usr/local

安装

/data/data

数据

/data/mdata

镜像

 

1.2操作系统

所有节点均为RedHat LinuxRed Hat Enterprise Linux Server release 6.0 (Santiago),查看方法:more /etc/issue

2.系统参数配置

2.1 hosts文件设置(所有节点全部操作)

情况允许的情况下可将master节点的名称改为mdwstandby节点改为smdwsegment改为sdw+nn为阿拉伯数字)。修改后的效果为:

情况如下(节选):

[root@GDY-BPU11 ~]# cat /etc/hosts

...

192.168.228.103  GDY-BPU03     

192.168.228.104  GDY-BPU04     

192.168.228.105  GDY-BPU05     

192.168.228.106  GDY-BPU06     

192.168.228.107  GDY-BPU07     

192.168.228.108  GDY-BPU08     

192.168.228.109  GDY-BPU09     

192.168.228.110  GDY-BPU10     

192.168.228.111  GDY-BPU11     

192.168.228.112  GDY-BPU12     

192.168.228.113  GDY-BPU13     

192.168.228.114  GDY-BPU14     

192.168.228.115  GDY-BPU15     

192.168.228.116  GDY-BPU16     

192.168.228.117  GDY-BPU17     

192.168.228.118  GDY-BPU18     

192.168.228.119  GDY-BPU19     

192.168.228.120  GDY-BPU20     

...

[root@GDY-BPU11 ~]#

 

其中:GDY-BPU11master节点,GDY-BPU12standby节点,GDY-BPU13-GDY-BPU20均为第一批segment节点;GDY-BPU03-GDY-BPU10为备用节点。

2.2内核参数设置(所有节点全部操作)

[root@GDY-BPU11 ~]# vi /etc/sysctl.conf 

# Kernel sysctl configuration file for Red Hat Linux

#

# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and

# sysctl.conf(5) for more details.

 

# Controls IP packet forwarding

#net.ipv4.ip_forward = 0(被注释)

 

# Controls source route verification

net.ipv4.conf.default.rp_filter = 1(未被注释)

 

# Do not accept source routing

#net.ipv4.conf.default.accept_source_route = 0(被注释)

 

# Controls the System Request debugging functionality of the kernel

#kernel.sysrq = 0(被注释)

 

# Controls whether core dumps will append the PID to the core filename.

# Useful for debugging multi-threaded applications.

#kernel.core_uses_pid = 1(被注释)

 

# Controls the use of TCP syncookies

#net.ipv4.tcp_syncookies = 1(被注释)

 

# Disable netfilter on bridges.

#net.bridge.bridge-nf-call-ip6tables = 0

#net.bridge.bridge-nf-call-iptables = 0

#net.bridge.bridge-nf-call-arptables = 0

#net.ipv4.tcp_max_syn_backlog=8192(被注释)

net.core.somaxconn=8192(未被注释)

 

(以上为原机器设置参数,下方为正式GP使用参数)

#used for greenplum

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 500000000

kernel.shmall = 4000000000

kernel.shmmni = 4096

kernel.sem = 250 512000 100 2048

kernel.sysrq = 1

kernel.core_uses_pid = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.msgmni = 2048

net.ipv4.tcp_syncookies = 1

net.ipv4.ip_forward = 0

net.ipv4.conf.default.accept_source_route = 0

net.ipv4.tcp_tw_recycle = 1

net.ipv4.tcp_max_syn_backlog = 4096

net.ipv4.conf.all.arp_filter = 1

net.ipv4.conf.default.arp_filter = 1

net.ipv4.ip_local_port_range = 1025 65535

net.core.netdev_max_backlog = 10000

vm.overcommit_memory = 2

[root@GDY-BPU11 ~]#

 

新增之后,使用sysctl -p命令生效

[root@GDY-BPU11 ~]# sysctl -p

net.ipv4.conf.default.rp_filter = 1

net.core.somaxconn = 8192

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 500000000

kernel.shmall = 4000000000

kernel.shmmni = 4096

kernel.sem = 250 512000 100 2048

kernel.sysrq = 1

kernel.core_uses_pid = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.msgmni = 2048

net.ipv4.tcp_syncookies = 1

net.ipv4.ip_forward = 0

net.ipv4.conf.default.accept_source_route = 0

net.ipv4.tcp_tw_recycle = 1

net.ipv4.tcp_max_syn_backlog = 4096

net.ipv4.conf.all.arp_filter = 1

net.ipv4.conf.default.arp_filter = 1

net.ipv4.ip_local_port_range = 1025 65535

net.core.netdev_max_backlog = 10000

vm.overcommit_memory = 2

[root@GDY-BPU11 ~]#

2.3安全限制参数(limit)设置(所有节点全部操作)

[root@GDY-BPU11 ~]# vi /etc/security/limits.conf

# /etc/security/limits.conf

...

# End of file

* hard core 0

* soft core 0

(下方为greenplum添加项)

#for greenplum

*  soft  nofile  65536

*  hard  nofile  65536

*  soft  nproc  131072

*  hard  nproc  131072

 

[root@GDY-BPU11 ~]#

2.4 主机名设置(所有节点全部操作)

主机名的情况同host文件,故在本文档中主机名的设置也暂时不做处理。

情况允许的情况下可将master主机的名称改为mdwstandby主机改为smdwsegment改为sdw+nn为阿拉伯数字)。修改完成后需重启机器。修改效果为:

[root@mdw ~]# cat /etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=mdw

 

2.5 I/O调度策略设置(所有节点全部操作)

linux默认的I/O调度模式是CFQ,通常需要修改I/O调度策略为deadline

I/O调度策略:

[root@GDY-BPU11 ~]# cat /sys/block/sda/queue/scheduler 

noop anticipatory deadline [cfq]

修改方法(临时修改):

[root@GDY-BPU11 ~]# echo deadline > /sys/block/sda/queue/scheduler 

[root@GDY-BPU11 ~]# cat /sys/block/sda/queue/scheduler

noop anticipatory [deadline] cfq

[root@GDY-BPU11 ~]#

2.6修改磁盘预读扇区数(所有节点全部操作)

3.准备工作

3.1创建群组&用户&修改密码(所有节点全部操作)

[root@GDY-BPU11 ~]# groupadd -g 520 gpadmin

[root@GDY-BPU11 ~]# useradd -u 520 -g gpadmin gpadmin

[root@GDY-BPU11 ~]# passwd gpadmin

更改用户 gpadmin 的密码 。

新的 密码:gpadmin2017

无效的密码: 过于简单

重新输入新的 密码:gpadmin2017

passwd: 所有的身份验证令牌已经成功更新。

[root@GDY-BPU11 ~]# id gpadmin

uid=520(gpadmin) gid=520(gpadmin) =520(gpadmin)

[root@GDY-BPU11 ~]#

3.2创建软件安装目录(所有节点全部操作)

[root@GDY-BPU11 ~]# mkdir -p /gpdb/app

[root@GDY-BPU11 ~]# chown -R gpadmin:gpadmin /gpdb/

[root@GDY-BPU11 ~]#

 

3.3创建存储目录(所有seg节点全部操作)

3.4上传&解压安装文件(master节点操作)

greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip文件从本地上传至192.168.228.111服务器的/gpdb目录下,过程同“附:Greenplum访问客户端psql的安装第二节”。

上传后:

[root@GDY-BPU11 gpdb]# ll

总用量 129196

-rw-r----- 1 root root 132293611 6月  20 19:14 greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip

[root@GDY-BPU11 gpdb]#

 

解压:

[root@GDY-BPU11 gpdb]# unzip greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip 

Archive:  greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip

  inflating: greenplum-db-4.3.11.0-build-1-rhel5-x86_64.bin  

[root@GDY-BPU11 gpdb]# ll

总用量 260720

-rwxr-xr-x 1 root root 134680441 12月 14 2016 greenplum-db-4.3.11.0-build-1-rhel5-x86_64.bin

-rw-r----- 1 root root 132293611 6月  20 19:14 greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip

[root@GDY-BPU11 gpdb]#

4.安装

4.1 master节点安装

[root@mdw local]# bash ./greenplum-db-4.3.11.0-build-1-rhel5-x86_64.bin 

 

********************************************************************************

You must read and accept the Pivotal Database license agreement

before installing

********************************************************************************

 

       ***  IMPORTANT INFORMATION - PLEASE READ CAREFULLY  ***

 

...(此处为greenplum相关协议许可信息,省略)

********************************************************************************

Do you accept the Pivotal Database license agreement? [yes|no]

********************************************************************************

yes(输入yes通过接受)

********************************************************************************

Provide the installation path for Greenplum Database or press ENTER to

accept the default installation path: /usr/local/greenplum-db-4.3.11.0

********************************************************************************

/gpdb/app(确认安装目录为提供的目录即可回车,否则需要自己输入目录路径。默认为/usr/local目录下)

********************************************************************************

Install Greenplum Database into /gpdb/app? [yes|no]

********************************************************************************

yes(回复)

 

Extracting product to /gpdb/app

 

********************************************************************************

Installation complete.

Greenplum Database is installed in /gpdb/app

 

Pivotal Greenplum documentation is available

for download at http://gpdb.docs.pivotal.io

********************************************************************************

 

安装完毕后对greenplum文件夹建立软连接

[root@GDY-BPU11 gpdb]# ll

总用量 260728

drwxr-x--- 11 gpadmin gpadmin      4096 6月  21 11:47 app

lrwxrwxrwx  1 root    root            5 6月  21 11:35 greenplum-db -> ./app

-rwxr-xr-x  1 root    root    134680441 12月 14 2016 greenplum-db-4.3.11.0-build-1-rhel5-x86_64.bin

-rw-r-----  1 root    root    132293611 6月  20 19:14 greenplum-db-4.3.11.0-build-1-rhel5-x86_64.zip

[root@GDY-BPU11 gpdb]#

 

4.2 master节点设置环境变量

[gpadmin@GDY-BPU11 ~]$ vi /home/gpadmin/.bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

source /gpdb/app/greenplum_path.sh

export MASTER_DATA_DIRECTORY=/data/gpdata/master/gpseg-1

 

生效:

[gpadmin@GDY-BPU11 ~]$ . .bash_profile 

[gpadmin@GDY-BPU11 ~]$

4.3 greenplum系统节点设置

为了方便管理以及节点间互信,需要编辑节点信息文件。

节点文件包括all_host(所有节点)和seg_host(存储节点)

All_host:

[gpadmin@GDY-BPU11 config]$ vi all_host

GDY-BPU11

GDY-BPU12

GDY-BPU13

GDY-BPU14

GDY-BPU15

GDY-BPU16

GDY-BPU17

GDY-BPU18

GDY-BPU19

GDY-BPU20

[gpadmin@GDY-BPU11 config]$

 

Seg_host:

[gpadmin@GDY-BPU11 config]$ vi seg_host

GDY-BPU12

GDY-BPU11

GDY-BPU13

GDY-BPU14

GDY-BPU15

GDY-BPU16

GDY-BPU17

GDY-BPU18

GDY-BPU19

GDY-BPU20

[gpadmin@GDY-BPU11 config]$

 

4.4 配置算法(全节点)&建立互信

*由于生产环境的SSH版本为6.7,故在用gpssh-exkeys命令建立互信前需要做以下操作:

全节点的/usr/etc/sshd_config文件夹下添加一行加密算法以保证加密密钥可以通过互信,否则进行互信操作时会产生

[ERROR GDY-BPU12] Incompatible ssh peer (no acceptable kex algorithm)

关于不安全算法被屏蔽的问题。操作如下:

 

[root@GDY-BPU12 ~]# vi /usr/etc/sshd_config

#       $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $

...

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

 

修改完毕后,重启ssh服务:

[root@GDY-BPU12 ~]# service sshd reload

重新载入 sshd[确定]

[root@GDY-BPU12 ~]#

 

使用gpssh-exkeys建立互信(密码输入为gpadmin用户密码):

[gpadmin@GDY-BPU11 ~]$ gpssh-exkeys -f config/all_host 

[STEP 1 of 5] create local ID and authorize on local host

  ... /home/gpadmin/.ssh/id_rsa file exists ... key generation skipped

 

[STEP 2 of 5] keyscan all hosts and update known_hosts file

 

[STEP 3 of 5] authorize current user on remote hosts

  ... send to GDY-BPU12

  ***

  *** Enter password for GDY-BPU12:

  ... send to GDY-BPU13

  ***

  *** Enter password for GDY-BPU13:

      ... send to GDY-BPU14

  ...(省略)

  *** Enter password for GDY-BPU20:

 

[STEP 4 of 5] determine common authentication file content

 

[STEP 5 of 5] copy authentication files to all remote hosts

  ... finished key exchange with GDY-BPU12

  ... finished key exchange with GDY-BPU13

      ...

      ... finished key exchange with GDY-BPU20

 

 

安装完毕后可以通过gpssh命令来查看互信是否成功。-f指定节点文件,-e指定linux操作命令

[gpadmin@GDY-BPU11 ~]$ gpssh -f config/all_host -e pwd

[GDY-BPU11] pwd

[GDY-BPU11] /home/gpadmin

[GDY-BPU12] pwd

[GDY-BPU12] /home/gpadmin

[GDY-BPU16] pwd

[GDY-BPU16] /home/gpadmin

[GDY-BPU13] pwd

[GDY-BPU13] /home/gpadmin

[GDY-BPU14] pwd

[GDY-BPU14] /home/gpadmin

[GDY-BPU18] pwd

[GDY-BPU18] /home/gpadmin

[GDY-BPU17] pwd

[GDY-BPU17] /home/gpadmin

[GDY-BPU15] pwd

[GDY-BPU15] /home/gpadmin

[GDY-BPU20] pwd

[GDY-BPU20] /home/gpadmin

[GDY-BPU19] pwd

[GDY-BPU19] /home/gpadmin

[gpadmin@GDY-BPU11 ~]$

 

4.5 segment节点安装

通过gpseginstall命令安装segment节点,-u指定安装用户,-p指定用户密码;segment节点会根据master节点的安装路径安装greenplum,目录结构各节点一致。

[gpadmin@GDY-BPU11 ~]$ gpseginstall -f config/all_host -u gpadmin -p gpadmin2017

20170622:09:55:39:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-Installation Info:

link_name greenplum-db

binary_path /gpdb/app

binary_dir_location /gpdb

binary_dir_name app

20170622:09:55:39:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-check cluster password access

20170622:09:55:43:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-de-duplicate hostnames

20170622:09:55:43:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-master hostname: GDY-BPU11

20170622:09:55:45:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-rm -f /gpdb/app.tar; rm -f /gpdb/app.tar.gz

20170622:09:55:45:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-cd /gpdb; tar cf app.tar app

20170622:09:55:50:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-gzip /gpdb/app.tar

20170622:09:56:26:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: mkdir -p /gpdb

20170622:09:56:28:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: rm -rf /gpdb/app

20170622:09:56:30:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-scp software to remote location

20170622:09:56:35:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: gzip -f -d /gpdb/app.tar.gz

20170622:09:56:42:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-md5 check on remote location

20170622:09:56:45:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: cd /gpdb; tar xf app.tar

20170622:09:56:48:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: rm -f /gpdb/app.tar

20170622:09:56:51:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: cd /gpdb; rm -f greenplum-db; ln -fs app greenplum-db

20170622:09:56:53:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-rm -f /gpdb/app.tar.gz

20170622:09:56:53:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-version string on master: gpssh version 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece

20170622:09:56:53:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: . /gpdb/greenplum-db/./greenplum_path.sh; /gpdb/greenplum-db/./bin/gpssh --version

20170622:09:56:55:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-remote command: . /gpdb/app/greenplum_path.sh; /gpdb/app/bin/gpssh --version

20170622:09:57:02:030572 gpseginstall:GDY-BPU11:gpadmin-[INFO]:-SUCCESS -- Requested commands completed

[gpadmin@GDY-BPU11 ~]$

 

4.6 节点设置环境变量(所有节点全部操作)

[gpadmin@GDY-BPU11 ~]$ vi /home/gpadmin/.bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

 

PATH=$PATH:$HOME/bin

 

export PATH

source /gpdb/app/greenplum_path.sh

 

生效:

[gpadmin@GDY-BPU11 ~]$ . .bash_profile 

[gpadmin@GDY-BPU11 ~]$

 

*注:如遇到以下情况,则为/etc/group目录权限不足,需要将权限升至755(最低644)。

[gpadmin@GDY-BPU12 ~]$ source .bash_profile 

id: 无法找到ID 520 的用户的属组

 

5.初始化

5.1 存储挂载(所有节点全部操作)

根据存储挂载记录所规划的方案进行文件挂载

 

创建需要挂载的文件夹(创建于根目录下):

[root@GDY-BPU11 ~]# mkdir /data

 

之后编辑挂载文件:

[root@GDY-BPU11 ~]# vi /etc/fstab 

#

# /etc/fstab

# Created by anaconda on Thu Jan 23 08:41:31 2014

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

...

UUID=00871840-9169-45ee-9bda-72ecfa648f95 /data                   ext3    defaults        1 0

 

编辑完挂载文件后需要使用mount命令自动挂载:

[root@GDY-BPU11 ~]# mount -a

[root@GDY-BPU11 ~]#

 

最后由df命令进行检查

[root@GDY-BPU11 ~]# df -Th

文件系统    类型      容量  已用  可用 已用%% 挂载点

/dev/sda2     ext4    1.7T   75G  1.6T   5% /

tmpfs        tmpfs     63G     0   63G   0% /dev/shm

/dev/sda1     ext4    194M   53M  132M  29% /boot

/dev/sddlmaa1 ext3    1.9T  4.4G  1.8T   1% /data

[root@GDY-BPU11 ~]#

5.2 创建目录(所有节点全部操作)

每个节点分别创建目录。

 

master&standby:

[root@GDY-BPU11 ~]# mkdir -p /data/gpdata/master/

[root@GDY-BPU11 ~]# chown -R gpadmin:gpadmin /data/gpdata

 

Segment:

[root@GDY-BPU13 data1]# mkdir -p /data1/gpdata/data /data1/gpdata/mdata

/data2/gpdata/data /data2/gpdata/mdata

[root@GDY-BPU13 data1]# chown -R gpadmin:gpadmin /data1/gpdata /data2/gpdata

5.3 同步时间

[gpadmin@GDY-BPU11 ~]$ gpssh -f config/all_host -v -e 'ntpd'

[WARN] Reference default values as $MASTER_DATA_DIRECTORY/gpssh.conf could not be found

Using delaybeforesend 0.05 and prompt_validation_timeout 1.0

 

[Reset ...]

[INFO] login GDY-BPU11

[INFO] login GDY-BPU12

[INFO] login GDY-BPU13

[INFO] login GDY-BPU14

[INFO] login GDY-BPU16

[INFO] login GDY-BPU15

[INFO] login GDY-BPU17

[INFO] login GDY-BPU20

[INFO] login GDY-BPU18

[INFO] login GDY-BPU19

[GDY-BPU11] ntpd

[GDY-BPU12] ntpd

[GDY-BPU13] ntpd

[GDY-BPU14] ntpd

[GDY-BPU16] ntpd

[GDY-BPU15] ntpd

[GDY-BPU17] ntpd

[GDY-BPU20] ntpd

[GDY-BPU18] ntpd

[GDY-BPU19] ntpd

[INFO] completed successfully

 

[Cleanup...]

[gpadmin@GDY-BPU11 ~]$

5.4 检查系统环境

在初始化数据库之前,需要进行先决条件检查,主要检查磁盘I/O能力、网络带宽、内核参数、limit等条件是否满足GreenPlum数据库的要求。

 

5.5 检查配置文件

greenplum安装目录下找到docs文件夹,将其中关于初始化的配置文件复制到用户目录下。

[gpadmin@GDY-BPU11 ~]$ cp /gpdb/app/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/config/

 

在配置文件中,修改参数:

[gpadmin@GDY-BPU11 ~]$ cat config/gpinitsystem_config 

# FILE NAME: gpinitsystem_config

 

# Configuration file needed by the gpinitsystem

 

################################################

#### REQUIRED PARAMETERS

################################################

 

#### Name of this Greenplum system enclosed in quotes.

ARRAY_NAME="EMC Greenplum DW"

 

#### Naming convention for utility-generated data directories.

SEG_PREFIX=gpseg

 

#### Base number by which primary segment port numbers

#### are calculated.

PORT_BASE=40000

 

#### File system location(s) where primary segment data directories

#### will be created. The number of locations in the list dictate

#### the number of primary segments that will get created per

#### physical host (if multiple addresses for a host are listed in

#### the hostfile, the number of segments will be spread evenly across

#### the specified interface addresses).

declare -a DATA_DIRECTORY=(/data1/gpdata/data /data2/gpdata/data)

(存储位置)

#### OS-configured hostname or IP address of the master host.

MASTER_HOSTNAME=GDY-BPU11

master名)

#### File system location where the master data directory

#### will be created.

MASTER_DIRECTORY=/data/gpdata/master

master目录)

#### Port number for the master instance.

MASTER_PORT=5432

master端口)

#### Shell utility used to connect to remote hosts.

TRUSTED_SHELL=ssh

 

#### Maximum log file segments between automatic WAL checkpoints.

CHECK_POINT_SEGMENTS=8

 

#### Default server-side character set encoding.

ENCODING=UNICODE

 

################################################

#### OPTIONAL MIRROR PARAMETERS

################################################

 

#### Base number by which mirror segment port numbers

#### are calculated.

MIRROR_PORT_BASE=50000

(镜像端口)

#### Base number by which primary file replication port

#### numbers are calculated.

REPLICATION_PORT_BASE=41000

(复制端口)

#### Base number by which mirror file replication port

#### numbers are calculated.

MIRROR_REPLICATION_PORT_BASE=51000

 

#### File system location(s) where mirror segment data directories

#### will be created. The number of mirror locations must equal the

#### number of primary locations as specified in the

#### DATA_DIRECTORY parameter.

declare -a MIRROR_DATA_DIRECTORY=(/data1/gpdata/mdata /data2/gpdata/mdata)

(镜像存储位置)

 

################################################

#### OTHER OPTIONAL PARAMETERS

################################################

 

#### Create a database of this name after initialization.

#DATABASE_NAME=name_of_database

DATABASE_NAME=cloudlinkin

(数据库名称)

#### Specify the location of the host address file here instead of

#### with the the -h option of gpinitsystem.

#MACHINE_LIST_FILE=/home/gpadmin/gpconfigs/hostfile_gpinitsystem

MACHINE_LIST_FILE=/home/gpadmin/config/seg_host

segment服务器文件)

5.6 初始化

[gpadmin@GDY-BPU11 ~]$ gpinitsystem -c config/gpinitsystem_config

20170623:10:13:48:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checking configuration parameters, please wait...

20170623:10:13:48:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Reading Greenplum configuration file config/gpinitsystem_config

20170623:10:13:48:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Locale has not been set in config/gpinitsystem_config, will set to default value

20170623:10:13:49:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Locale set to en_US.utf8

20170623:10:13:49:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250

20170623:10:13:50:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checking configuration parameters, Completed

20170623:10:13:50:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Commencing multi-home checks, please wait...

........

20170623:10:13:52:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Configuring build for standard array

20170623:10:13:52:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Commencing multi-home checks, Completed

20170623:10:13:52:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Building primary segment instance array, please wait...

................

20170623:10:14:04:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Building group mirror array type , please wait...

................

20170623:10:14:17:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checking Master host

20170623:10:14:17:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checking new segment hosts, please wait...

................................

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checking new segment hosts, Completed

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Greenplum Database Creation Parameters

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master Configuration

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master instance name       = EMC Greenplum DW

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master hostname            = GDY-BPU11

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master port                = 5432

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master instance dir        = /data/gpdata/master/gpseg-1

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master LOCALE              = en_US.utf8

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Greenplum segment prefix   = gpseg

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master Database            = cloudlinkin

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master connections         = 250

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master buffers             = 128000kB

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Segment connections        = 750

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Segment buffers            = 128000kB

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Checkpoint segments        = 8

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Encoding                   = UNICODE

20170623:10:14:54:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Postgres param file        = Off

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Initdb to be used          = /gpdb/greenplum-db/./bin/initdb

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GP_LIBRARY_PATH is         = /gpdb/greenplum-db/./lib

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Ulimit check               = Passed

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Array host connect type    = Single hostname per node

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [1]      = ::1

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [2]      = 192.168.105.121

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [3]      = 192.168.227.111

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [4]      = 192.168.228.111

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [5]      = fe80::e611:5bff:fedf:815c

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Master IP address [6]      = fe80::e611:5bff:fedf:815d

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Standby Master             = Not Configured

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Primary segment #          = 2

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total Database segments    = 16

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Trusted shell              = ssh

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Number segment hosts       = 8

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Mirror port base           = 50000

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Replicaton port base       = 41000

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Mirror replicaton port base= 51000

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Mirror segment #           = 2

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Mirroring config           = ON

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Mirroring type             = Group

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:----------------------------------------

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Greenplum Primary Segment Configuration

20170623:10:14:55:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:----------------------------------------

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU13       /data1/gpdata/data/gpseg0       40000   2       0       41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU13       /data2/gpdata/data/gpseg1       40001   3       1       41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU14       /data1/gpdata/data/gpseg2       40000   4       2       41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU14       /data2/gpdata/data/gpseg3       40001   5       3       41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU15       /data1/gpdata/data/gpseg4       40000   6       4       41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU15       /data2/gpdata/data/gpseg5       40001   7       5       41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU16       /data1/gpdata/data/gpseg6       40000   8       6       41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU16       /data2/gpdata/data/gpseg7       40001   9       7       41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU17       /data1/gpdata/data/gpseg8       40000   10      8       41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU17       /data2/gpdata/data/gpseg9       40001   11      9       41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU18       /data1/gpdata/data/gpseg10      40000   12      10      41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU18       /data2/gpdata/data/gpseg11      40001   13      11      41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU19       /data1/gpdata/data/gpseg12      40000   14      12      41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU19       /data2/gpdata/data/gpseg13      40001   15      13      41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU20       /data1/gpdata/data/gpseg14      40000   16      14      41000

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU20       /data2/gpdata/data/gpseg15      40001   17      15      41001

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Greenplum Mirror Segment Configuration

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:10:14:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU14       /data1/gpdata/mdata/gpseg0      50000   18      0       51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU14       /data2/gpdata/mdata/gpseg1      50001   19      1       51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU15       /data1/gpdata/mdata/gpseg2      50000   20      2       51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU15       /data2/gpdata/mdata/gpseg3      50001   21      3       51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU16       /data1/gpdata/mdata/gpseg4      50000   22      4       51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU16       /data2/gpdata/mdata/gpseg5      50001   23      5       51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU17       /data1/gpdata/mdata/gpseg6      50000   24      6       51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU17       /data2/gpdata/mdata/gpseg7      50001   25      7       51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU18       /data1/gpdata/mdata/gpseg8      50000   26      8       51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU18       /data2/gpdata/mdata/gpseg9      50001   27      9       51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU19       /data1/gpdata/mdata/gpseg10     50000   28      10      51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU19       /data2/gpdata/mdata/gpseg11     50001   29      11      51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU20       /data1/gpdata/mdata/gpseg12     50000   30      12      51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU20       /data2/gpdata/mdata/gpseg13     50001   31      13      51001

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU13       /data1/gpdata/mdata/gpseg14     50000   32      14      51000

20170623:10:14:57:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-GDY-BPU13       /data2/gpdata/mdata/gpseg15     50001   33      15      51001

Continue with Greenplum creation Yy/Nn>

y

20170623:10:15:36:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Building the Master instance database, please wait...

20170623:10:15:56:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Starting the Master in admin mode

20170623:10:16:38:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel build of primary segment instances

20170623:10:16:38:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Spawning parallel processes    batch [1], please wait...

................

20170623:10:16:40:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...

................................

20170623:10:17:12:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:12:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Parallel process exit status

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as completed           = 16

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as killed              = 0

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as failed              = 0

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel build of mirror segment instances

20170623:10:17:13:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Spawning parallel processes    batch [1], please wait...

................

20170623:10:17:15:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...

............

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Parallel process exit status

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as completed           = 16

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as killed              = 0

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Total processes marked as failed              = 0

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------

20170623:10:17:27:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Deleting distributed backout files

20170623:10:17:28:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Removing back out file

20170623:10:17:28:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-No errors generated from parallel processes

20170623:10:17:28:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode

20170623:10:17:28:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Starting gpstop with args: -a -l /home/gpadmin/gpAdminLogs -i -m -d /data/gpdata/master/gpseg-1

20170623:10:17:28:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Gathering information and validating the environment...

20170623:10:17:28:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20170623:10:17:28:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Obtaining Segment details from master...

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece'

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-There are 0 connections to the database

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate'

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Master host=GDY-BPU11

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate

20170623:10:17:29:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Master segment instance directory=/data/gpdata/master/gpseg-1

20170623:10:17:30:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process

20170623:10:17:30:010058 gpstop:GDY-BPU11:gpadmin-[INFO]:-Terminating processes for segment /data/gpdata/master/gpseg-1

20170623:10:17:30:010058 gpstop:GDY-BPU11:gpadmin-[ERROR]:-Failed to kill processes for segment /data/gpdata/master/gpseg-1: ([Errno 3] No such process)

20170623:10:17:31:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting gpstart with args: -a -l /home/gpadmin/gpAdminLogs -d /data/gpdata/master/gpseg-1

20170623:10:17:31:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Gathering information and validating the environment...

20170623:10:17:31:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece'

20170623:10:17:31:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'

20170623:10:17:31:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting Master instance in admin mode

20170623:10:17:32:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20170623:10:17:32:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Obtaining Segment details from master...

20170623:10:17:32:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Setting new master era

20170623:10:17:32:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master Started...

20170623:10:17:32:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Shutting down master

20170623:10:17:34:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel primary and mirror segment instance startup, please wait...

...

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Process results...

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Successful segment starts                                            = 32

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Failed segment starts                                                = 0

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Successfully started 32 of 32 segment instances

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:10:17:37:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting Master instance GDY-BPU11 directory /data/gpdata/master/gpseg-1

20170623:10:17:39:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Command pg_ctl reports Master GDY-BPU11 instance active

20170623:10:17:39:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-No standby master configured.  skipping...

20170623:10:17:39:010284 gpstart:GDY-BPU11:gpadmin-[INFO]:-Database successfully started

20170623:10:17:39:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode

20170623:10:17:39:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Loading gp_toolkit...

20170623:10:17:45:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Scanning utility log file for any warning messages

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[WARN]:-*******************************************************

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[WARN]:-were generated during the array creation

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Please review contents of log file

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20170623.log

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-To determine level of criticality

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-These messages could be from a previous run of the utility

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-that was called today!

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[WARN]:-*******************************************************

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Greenplum Database instance successfully created

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-------------------------------------------------------

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-To complete the environment configuration, please

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-update gpadmin .bashrc file with the following

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data/gpdata/master/gpseg-1"

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-   to access the Greenplum scripts for this instance:

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-   or, use -d /data/gpdata/master/gpseg-1 option for the Greenplum scripts

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-   Example gpstate -d /data/gpdata/master/gpseg-1

20170623:10:17:46:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20170623.log

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Review options for gpinitstandby

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-------------------------------------------------------

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-The Master /data/gpdata/master/gpseg-1/pg_hba.conf post gpinitsystem

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-has been configured to allow all hosts within this new

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-new array must be explicitly added to this file

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-located in the /gpdb/greenplum-db/./docs directory

20170623:10:17:47:053123 gpinitsystem:GDY-BPU11:gpadmin-[INFO]:-------------------------------------------------------

[gpadmin@GDY-BPU11 ~]$

6.启动&停止Greenplum

6.1 启动

[gpadmin@GDY-BPU11 ~]$ gpstart

20170623:11:35:48:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting gpstart with args:

20170623:11:35:48:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Gathering information and validating the environment...

20170623:11:35:48:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece'

20170623:11:35:48:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'

20170623:11:35:48:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting Master instance in admin mode

20170623:11:35:50:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20170623:11:35:50:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Obtaining Segment details from master...

20170623:11:35:50:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Setting new master era

20170623:11:35:50:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master Started...

20170623:11:35:50:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Shutting down master

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:---------------------------

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master instance parameters

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:---------------------------

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Database                 = template1

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master Port              = 5432

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master directory         = /data/gpdata/master/gpseg-1

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Timeout                  = 600 seconds

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Master standby           = Off

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Segment instances that will be started

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:---------------------------------------

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Host        Datadir                       Port    Role

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data1/gpdata/data/gpseg0     40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data1/gpdata/mdata/gpseg0    50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data2/gpdata/data/gpseg1     40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data2/gpdata/mdata/gpseg1    50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data1/gpdata/data/gpseg2     40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data1/gpdata/mdata/gpseg2    50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data2/gpdata/data/gpseg3     40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data2/gpdata/mdata/gpseg3    50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data1/gpdata/data/gpseg4     40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data1/gpdata/mdata/gpseg4    50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data2/gpdata/data/gpseg5     40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data2/gpdata/mdata/gpseg5    50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data1/gpdata/data/gpseg6     40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data1/gpdata/mdata/gpseg6    50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data2/gpdata/data/gpseg7     40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data2/gpdata/mdata/gpseg7    50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data1/gpdata/data/gpseg8     40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data1/gpdata/mdata/gpseg8    50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data2/gpdata/data/gpseg9     40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data2/gpdata/mdata/gpseg9    50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data1/gpdata/data/gpseg10    40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data1/gpdata/mdata/gpseg10   50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data2/gpdata/data/gpseg11    40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data2/gpdata/mdata/gpseg11   50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data1/gpdata/data/gpseg12    40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data1/gpdata/mdata/gpseg12   50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data2/gpdata/data/gpseg13    40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data2/gpdata/mdata/gpseg13   50001   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data1/gpdata/data/gpseg14    40000   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data1/gpdata/mdata/gpseg14   50000   Mirror

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data2/gpdata/data/gpseg15    40001   Primary

20170623:11:35:52:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data2/gpdata/mdata/gpseg15   50001   Mirror

 

Continue with Greenplum instance startup Yy|Nn (default=N):

> y(以上记录了GreenPlum数据库的一些基本信息)

20170623:11:35:55:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel primary and mirror segment instance startup, please wait...

...

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Process results...

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Successful segment starts                                            = 32

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Failed segment starts                                                = 0

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Successfully started 32 of 32 segment instances

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:11:35:58:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Starting Master instance GDY-BPU11 directory /data/gpdata/master/gpseg-1

20170623:11:35:59:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Command pg_ctl reports Master GDY-BPU11 instance active

20170623:11:35:59:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-No standby master configured.  skipping...

20170623:11:35:59:041712 gpstart:GDY-BPU11:gpadmin-[INFO]:-Database successfully started

[gpadmin@GDY-BPU11 ~]$

 

6.2 查看状态

[gpadmin@GDY-BPU11 ~]$ gpstate

20170623:15:09:25:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-Starting gpstate with args:

20170623:15:09:26:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece'

20170623:15:09:26:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Dec 14 2016 02:23:59'

20170623:15:09:26:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-Obtaining Segment details from master...

20170623:15:09:26:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-Gathering data from segments...

..

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-Greenplum instance status summary

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Master instance                                           = Active

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Master standby                                            = No master standby configured

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total segment instance count from metadata                = 32

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Primary Segment Status

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total primary segments                                    = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total primary segment valid (at master)                   = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total primary segment failures (at master)                = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid files missing              = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid files found                = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid PIDs missing               = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid PIDs found                 = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of /tmp lock files missing                   = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of /tmp lock files found                     = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number postmaster processes missing                 = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number postmaster processes found                   = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Mirror Segment Status

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total mirror segments                                     = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total mirror segment valid (at master)                    = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total mirror segment failures (at master)                 = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid files missing              = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid files found                = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid PIDs missing               = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of postmaster.pid PIDs found                 = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of /tmp lock files missing                   = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number of /tmp lock files found                     = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number postmaster processes missing                 = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number postmaster processes found                   = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number mirror segments acting as primary segments   = 0

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-   Total number mirror segments acting as mirror segments    = 16

20170623:15:09:28:006088 gpstate:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

[gpadmin@GDY-BPU11 ~]$

6.3 关闭

[gpadmin@GDY-BPU11 ~]$ gpstop

20170623:15:10:22:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Starting gpstop with args:

20170623:15:10:22:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Gathering information and validating the environment...

20170623:15:10:22:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20170623:15:10:22:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Obtaining Segment details from master...

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.11.0 build commit: dc719b3e8d8b1e1f2a4b9eb1728d1d52a8431ece'

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:---------------------------------------------

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Master instance parameters

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:---------------------------------------------

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Master Greenplum instance process active PID   = 42066

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Database                                       = template1

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Master port                                    = 5432

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Master directory                               = /data/gpdata/master/gpseg-1

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Shutdown mode                                  = smart

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Timeout                                        = 120

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Shutdown Master standby host                   = Off

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:---------------------------------------------

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Segment instances that will be shutdown:

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:---------------------------------------------

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Host        Datadir                       Port    Status

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data1/gpdata/data/gpseg0     40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data1/gpdata/mdata/gpseg0    50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data2/gpdata/data/gpseg1     40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data2/gpdata/mdata/gpseg1    50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data1/gpdata/data/gpseg2     40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data1/gpdata/mdata/gpseg2    50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU14   /data2/gpdata/data/gpseg3     40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data2/gpdata/mdata/gpseg3    50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data1/gpdata/data/gpseg4     40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data1/gpdata/mdata/gpseg4    50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU15   /data2/gpdata/data/gpseg5     40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data2/gpdata/mdata/gpseg5    50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data1/gpdata/data/gpseg6     40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data1/gpdata/mdata/gpseg6    50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU16   /data2/gpdata/data/gpseg7     40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data2/gpdata/mdata/gpseg7    50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data1/gpdata/data/gpseg8     40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data1/gpdata/mdata/gpseg8    50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU17   /data2/gpdata/data/gpseg9     40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data2/gpdata/mdata/gpseg9    50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data1/gpdata/data/gpseg10    40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data1/gpdata/mdata/gpseg10   50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU18   /data2/gpdata/data/gpseg11    40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data2/gpdata/mdata/gpseg11   50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data1/gpdata/data/gpseg12    40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data1/gpdata/mdata/gpseg12   50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU19   /data2/gpdata/data/gpseg13    40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data2/gpdata/mdata/gpseg13   50001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data1/gpdata/data/gpseg14    40000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data1/gpdata/mdata/gpseg14   50000   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU20   /data2/gpdata/data/gpseg15    40001   u

20170623:15:10:23:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   GDY-BPU13   /data2/gpdata/mdata/gpseg15   50001   u

 

Continue with Greenplum instance shutdown Yy|Nn (default=N):

> y

20170623:15:10:31:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-There are 0 connections to the database

20170623:15:10:31:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='smart'

20170623:15:10:31:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Master host=GDY-BPU11

20170623:15:10:31:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=smart

20170623:15:10:31:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Master segment instance directory=/data/gpdata/master/gpseg-1

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Terminating processes for segment /data/gpdata/master/gpseg-1

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[ERROR]:-Failed to kill processes for segment /data/gpdata/master/gpseg-1: ([Errno 3] No such process)

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-No standby master host configured

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel primary segment instance shutdown, please wait...

20170623:15:10:32:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-0.00% of jobs completed

20170623:15:10:42:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-100.00% of jobs completed

20170623:15:10:42:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Commencing parallel mirror segment instance shutdown, please wait...

20170623:15:10:42:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-0.00% of jobs completed

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-100.00% of jobs completed

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Segments stopped successfully      = 32

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-   Segments with errors during stop   = 0

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-----------------------------------------------------

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Successfully shutdown 32 of 32 segment instances

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Database successfully shutdown with no errors reported

20170623:15:10:52:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Cleaning up leftover gpmmon process

20170623:15:10:53:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-No leftover gpmmon process found

20170623:15:10:53:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Cleaning up leftover gpsmon processes

20170623:15:10:53:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-No leftover gpsmon processes on some hosts. not attempting forceful termination on these hosts

20170623:15:10:53:009030 gpstop:GDY-BPU11:gpadmin-[INFO]:-Cleaning up leftover shared memory

[gpadmin@GDY-BPU11 ~]$

 

7.Standby节点扩展

7.1 standby节点配置

所有配置同其他节点。

7.2 standby节点扩展

执行gpinitstandby命令以扩展。

[gpadmin@GDY-BPU11 ~]$ gpinitstandby -s GDY-BPU12

20170623:16:28:49:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Validating environment and parameters for standby initialization...

20170623:16:28:49:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Checking for filespace directory /data/gpdata/master/gpseg-1 on GDY-BPU12

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------------

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum standby master initialization parameters

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------------

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum master hostname               = GDY-BPU11

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum master data directory         = /data/gpdata/master/gpseg-1

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum master port                   = 5432

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum standby master hostname       = GDY-BPU12

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum standby master port           = 5432

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum standby master data directory = /data/gpdata/master/gpseg-1

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Greenplum update system catalog         = On

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------------

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:- Filespace locations

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:------------------------------------------------------

20170623:16:28:50:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-pg_system -> /data/gpdata/master/gpseg-1

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

> y

20170623:16:28:59:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Syncing Greenplum Database extensions to standby

20170623:16:28:59:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-The packages on GDY-BPU12 are consistent.

20170623:16:28:59:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Adding standby master to catalog...

20170623:16:28:59:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Database catalog updated successfully.

20170623:16:29:00:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Updating pg_hba.conf file...

20170623:16:29:06:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-pg_hba.conf files updated successfully.

20170623:16:29:08:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Updating filespace flat files...

20170623:16:29:08:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Filespace flat file updated successfully.

20170623:16:29:09:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Starting standby master

20170623:16:29:09:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Checking if standby master is running on host: GDY-BPU12  in directory: /data/gpdata/master/gpseg-1

20170623:16:29:13:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files...

20170623:16:29:18:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully.

20170623:16:29:18:049078 gpinitstandby:GDY-BPU11:gpadmin-[INFO]:-Successfully created standby master on GDY-BPU12

[gpadmin@GDY-BPU11 ~]$

附:Greenplum访问客户端psql的安装

1.获取资源

https://www.postgresql.org/download/上下载

postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm(客户端)和

postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm(依赖包)。

2.传输文件

1) 通过winscp访问跳板机,将客户端和依赖包发送至跳板机182.92.191.83
跳板机(182.92.191.83)操作:

[ucloudlinkin@iZ2591evaqxZ ~]$ ll

total 2731296

...

-rw-rw-r-- 1 ucloudlinkin ucloudlinkin    1437460 Feb 20 10:17 postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm

-rw-rw-r-- 1 ucloudlinkin ucloudlinkin     287928 Feb 20 10:30 postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm

...

[ucloudlinkin@iZ2591evaqxZ ~]$

 

2) 通过scp命令将文件传输至跳板机机器218.200.243.228,端口为2002

跳板机(182.92.191.83)操作:

[ucloudlinkin@iZ2591evaqxZ ~]$ scp -P 2002 /home/ucloudlinkin/postgresql96-*  root@218.200.243.228:/root

root@218.200.243.228's password:

postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm        100%  1404KB  1.4MB/s   00:00    

postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm     100%  281KB  281.2KB/s   00:00    

[ucloudlinkin@iZ2591evaqxZ ~]$

跳转后机器(218.200.243.228)操作:

[root@BJBJ-BS-MAIL-PEM-GGLC-MN-MGR01 ~]# ll

总计 5998640

...

-rw-r--r--  1 root          root             1437460 06-20 18:51 postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm

-rw-r--r--  1 root          root              287928 06-20 18:51 postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm

...

You have new mail in /var/spool/mail/root

[root@BJBJ-BS-MAIL-PEM-GGLC-MN-MGR01 ~]#

 

3) 通过scp命令将文件传输至广州私有云服务器218.200.243.228,端口为2002

跳板机(218.200.243.228)操作:

[root@BJBJ-BS-MAIL-PEM-GGLC-MN-MGR01 ~]#  scp -P 2002 /root/postgresql96-*  root@221.176.66.201:/root

root@221.176.66.201's password:

postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm        100%  1404KB  1.4MB/s   00:00    

postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm     100%  281KB  281.2KB/s   00:00    

[root@BJBJ-BS-MAIL-PEM-GGLC-MN-MGR01 ~]#

 

4) 通过scp命令将文件传输至广州私有云内部服务器192.168.228.111

私有云服务器(218.200.243.228)操作:

[root@GDY-YYMN ~]# scp /root/postgresql96-*  root@192.168.228.111:/root

root@192.168.228.111's password:

postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm              100% 1404KB   1.4MB/s   00:00    

postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm         100%  281KB 281.2KB/s   00:00    

[root@GDY-YYMN ~]#

3.安装

1) 将安装包传至/opt目录下,使用命令rpm -ivh解压

[root@GDY-BPU11 opt]# rpm -ivh postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm --nodeps --force

warning: postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY

Preparing...                ########################################### [100%]

   1:postgresql96           ########################################### [100%]

[root@GDY-BPU11 opt]# rpm -ivh postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm  --nodeps --force

warning: postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY

Preparing...                ########################################### [100%]

   1:postgresql96-libs      ########################################### [100%]

[root@GDY-BPU11 opt]# 

文章评论

亲爱的项目经理,我恨你
亲爱的项目经理,我恨你
60个开发者不容错过的免费资源库
60个开发者不容错过的免费资源库
老程序员的下场
老程序员的下场
程序员眼里IE浏览器是什么样的
程序员眼里IE浏览器是什么样的
代码女神横空出世
代码女神横空出世
5款最佳正则表达式编辑调试器
5款最佳正则表达式编辑调试器
程序员最害怕的5件事 你中招了吗?
程序员最害怕的5件事 你中招了吗?
我的丈夫是个程序员
我的丈夫是个程序员
那些争议最大的编程观点
那些争议最大的编程观点
什么才是优秀的用户界面设计
什么才是优秀的用户界面设计
一个程序员的时间管理
一个程序员的时间管理
聊聊HTTPS和SSL/TLS协议
聊聊HTTPS和SSL/TLS协议
那些性感的让人尖叫的程序员
那些性感的让人尖叫的程序员
 程序员的样子
程序员的样子
程序员必看的十大电影
程序员必看的十大电影
Google伦敦新总部 犹如星级庄园
Google伦敦新总部 犹如星级庄园
总结2014中国互联网十大段子
总结2014中国互联网十大段子
老美怎么看待阿里赴美上市
老美怎么看待阿里赴美上市
中美印日四国程序员比较
中美印日四国程序员比较
我跳槽是因为他们的显示器更大
我跳槽是因为他们的显示器更大
漫画:程序员的工作
漫画:程序员的工作
初级 vs 高级开发者 哪个性价比更高?
初级 vs 高级开发者 哪个性价比更高?
程序员应该关注的一些事儿
程序员应该关注的一些事儿
2013年美国开发者薪资调查报告
2013年美国开发者薪资调查报告
如何区分一个程序员是“老手“还是“新手“?
如何区分一个程序员是“老手“还是“新手“?
科技史上最臭名昭著的13大罪犯
科技史上最臭名昭著的13大罪犯
如何成为一名黑客
如何成为一名黑客
当下全球最炙手可热的八位少年创业者
当下全球最炙手可热的八位少年创业者
Java程序员必看电影
Java程序员必看电影
程序员和编码员之间的区别
程序员和编码员之间的区别
每天工作4小时的程序员
每天工作4小时的程序员
要嫁就嫁程序猿—钱多话少死的早
要嫁就嫁程序猿—钱多话少死的早
为什么程序员都是夜猫子
为什么程序员都是夜猫子
十大编程算法助程序员走上高手之路
十大编程算法助程序员走上高手之路
程序猿的崛起——Growth Hacker
程序猿的崛起——Growth Hacker
Web开发人员为什么越来越懒了?
Web开发人员为什么越来越懒了?
程序员的一天:一寸光阴一寸金
程序员的一天:一寸光阴一寸金
为啥Android手机总会越用越慢?
为啥Android手机总会越用越慢?
看13位CEO、创始人和高管如何提高工作效率
看13位CEO、创始人和高管如何提高工作效率
写给自己也写给你 自己到底该何去何从
写给自己也写给你 自己到底该何去何从
程序员周末都喜欢做什么?
程序员周末都喜欢做什么?
我是如何打败拖延症的
我是如何打败拖延症的
不懂技术不要对懂技术的人说这很容易实现
不懂技术不要对懂技术的人说这很容易实现
10个调试和排错的小建议
10个调试和排错的小建议
10个帮程序员减压放松的网站
10个帮程序员减压放松的网站
2013年中国软件开发者薪资调查报告
2013年中国软件开发者薪资调查报告
鲜为人知的编程真相
鲜为人知的编程真相
做程序猿的老婆应该注意的一些事情
做程序猿的老婆应该注意的一些事情
Web开发者需具备的8个好习惯
Web开发者需具备的8个好习惯
软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有