文档章节

Greenplum的安装

kenyon_君羊
 kenyon_君羊
发布于 2015/08/04 15:51
字数 4567
阅读 6739
收藏 24
Geenplum是一款基于postgresql开发的mpp数据库,适合于数据仓库数据存储,是对hadoop无法有效处理结构化数据的一个很好的补充。五年前曾经使用过greenplum,那时的版本还是3.6,现在已经更新到4.3.5了,有消息称今年将开源。和以前的相比,安装方式也有了一些小变化,简记如下,如要更详细的说明,还是得看官方文档。

一、测试环境
CentOS 6.5 8台虚机
Greenplum 4.3.5

二、环境准备
1.修改系统参数
编辑 /etc/sysctl.conf ,以下是最小配置 
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
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.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog = 10000
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
vm.overcommit_memory = 2  

2.修改文件打开数等限制
编辑/etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

编辑/etc/security/limits.d/90-nproc.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072

3.修改scheduler
编辑scheduler,原先默认是cfq
echo deadline > /sys/block/vda/queue/scheduler
[root@bigdata03 ~]# more  /sys/block/vda/queue/scheduler 
noop anticipatory [deadline] cfq 

4.编辑/boot/grub/grub.conf
新增 elevator=deadline
[root @bigdata03 ~]# more /boot/grub/grub.conf
...elevator=deadline crashkernel=auto ...

5.编辑设备块大小
[root@bigdata03 ~]# /sbin/blockdev --setra 16384 /dev/vda
[root@bigdata03 ~]# /sbin/blockdev --getra /dev/vda
16384

6.配置hosts文件
编辑/etc/hosts,添加,选中203作为master,其他为segment,偷懒没改,直接加了层别名
172.30.13.203   bigdata03.rdchz mdw	
172.30.13.204	bigdata04.rdchz sdw1
172.30.13.205	bigdata05.rdchz sdw2
172.30.13.206	bigdata06.rdchz sdw3
172.30.13.207	bigdata07.rdchz sdw4
172.30.13.208	bigdata08.rdchz sdw5
172.30.13.209	bigdata09.rdchz sdw6
172.30.13.210	bigdata10.rdchz sdw7

7.分别创建各数据节点文件(一个含master,一个不含)
[root@bigdata03 ~]# more /tmp/hostfile_exkeys 
mdw
sdw1
sdw2
sdw3
sdw4
sdw5
sdw6
sdw7

[root@bigdata03 data]# more /tmp/hostfile_segments 
sdw1
sdw2
sdw3
sdw4
sdw5
sdw6
sdw7
三、集群安装
1.软件下载,上传、解压缩
下载地址:https://network.pivotal.io/products/pivotal-gpdb
unzip greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.zip
/bin/bash greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.bin

输入yes同意aggrement
输入安装路径,比如/usr/local/gpmaster

最后安装完后,结果是这样的:
[root@bigdata03 gpmaster]# ll
total 284
drwxr-xr-x 3  gpadmin gpadmin 4096 Jun 24 12:29 bin
drwxr-xr-x 2  gpadmin goadmin 4096 Jun 24 12:09 demo
drwxr-xr-x 5  gpadmin gpadmin 4096 Jun 24 12:09 docs
drwxr-xr-x 2  gpadmin gpadmin 4096 Jun 24 12:09 etc
drwxr-xr-x 3  gpadmin gpadmin 4096 Jun 24 12:09 ext
-rw-r--r-- 1  gpadmin gpadmin 43025 Jun 24 12:29 GPDB-LICENSE.txt
-rw-r--r-- 1  gpadmin gpadmin 664 Jul 28 14:51 greenplum_path.sh
drwxr-xr-x 6  gpadmin gpadmin 4096 Jun 24 12:09 include
drwxr-xr-x 9  gpadmin gpadmin 12288 Jun 24 12:09 lib
-rw-r--r-- 1  gpadmin gpadmin 193083 Jun 24 12:29 LICENSE.thirdparty
drwxr-xr-x 2  gpadmin gpadmin 4096 Jun 24 12:29 sbin
drwxr-xr-x 3  gpadmin gpadmin 4096 Jun 24 11:57 share

2.建立master与各节点的信任关系
[root@bigdata03 ~]# source /usr/local/greenplum-db/greenplum_path.sh
[root@bigdata03 ~]# gpssh-exkeys -f /tmp/hostfile_exkeys 
[STEP 1 of 5] create local ID and authorize on local host
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts
  ... send to sdw1
  ***
  *** Enter password for sdw1: 
  ... send to sdw2
  ... send to sdw3
  ... send to sdw4
  ... send to sdw5
  ... send to sdw6
  ... send to sdw7
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
  ... finished key exchange with sdw1
  ... finished key exchange with sdw2
  ... finished key exchange with sdw3
  ... finished key exchange with sdw4
  ... finished key exchange with sdw5
  ... finished key exchange with sdw6
  ... finished key exchange with sdw7
[INFO] completed successfully

实质就是master与各个节点创建了个ssh的信任关系,信任的key存放在/root/.ssh/authorized_keys里
--测试是否无需密码登陆,ok
[root@bigdata03 ~]# ssh root@172.30.13.204
Last login: Wed Jul 29 08:45:58 2015 from 172.30.11.31
[root@bigdata04 ~]# exit
logout
Connection to 172.30.13.204 closed.
[root@bigdata03 ~]#
[root@bigdata03 ~]# ssh root@sdw7
Last login: Wed Jul 29 08:49:20 2015 from 172.30.11.31
[root@bigdata10 ~]# exit
logout
Connection to sdw7 closed.
[root@bigdata03 ~]#

3.安装各个节点准备
首先把包传送到各个节点上,并解压缩以及创建用户,组等
[root@bigdata03 ~]# gpseginstall -f /tmp/hostfile_exkeys -u gpadmin -p 123456
20150729:09:20:20:029326 gpseginstall:bigdata03:root-[INFO]:-Installation Info:
link_name greenplum-db
binary_path /usr/local/gpmaster
binary_dir_location /usr/local
binary_dir_name gpmaster
20150729:09:20:20:029326 gpseginstall:bigdata03:root-[INFO]:-check cluster password access
20150729:09:20:22:029326 gpseginstall:bigdata03:root-[INFO]:-de-duplicate hostnames
20150729:09:20:22:029326 gpseginstall:bigdata03:root-[INFO]:-master hostname: bigdata03.rdchz
20150729:09:20:23:029326 gpseginstall:bigdata03:root-[INFO]:-check for user gpadmin on cluster
20150729:09:20:24:029326 gpseginstall:bigdata03:root-[INFO]:-add user gpadmin on master
20150729:09:20:24:029326 gpseginstall:bigdata03:root-[INFO]:-add user gpadmin on cluster
20150729:09:20:24:029326 gpseginstall:bigdata03:root-[INFO]:-chown -R gpadmin:gpadmin /usr/local/greenplum-db
20150729:09:20:24:029326 gpseginstall:bigdata03:root-[INFO]:-chown -R gpadmin:gpadmin /usr/local/gpmaster
20150729:09:20:25:029326 gpseginstall:bigdata03:root-[INFO]:-rm -f /usr/local/gpmaster.tar; rm -f /usr/local/gpmaster.tar.gz
20150729:09:20:25:029326 gpseginstall:bigdata03:root-[INFO]:-cd /usr/local; tar cf gpmaster.tar gpmaster
20150729:09:20:27:029326 gpseginstall:bigdata03:root-[INFO]:-gzip /usr/local/gpmaster.tar
20150729:09:20:54:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: mkdir -p /usr/local
20150729:09:20:55:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: rm -rf /usr/local/gpmaster
20150729:09:20:56:029326 gpseginstall:bigdata03:root-[INFO]:-scp software to remote location
20150729:09:21:00:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: gzip -f -d /usr/local/gpmaster.tar.gz
20150729:09:21:06:029326 gpseginstall:bigdata03:root-[INFO]:-md5 check on remote location
20150729:09:21:09:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: cd /usr/local; tar xf gpmaster.tar
20150729:09:21:11:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: rm -f /usr/local/gpmaster.tar
20150729:09:21:12:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: cd /usr/local; rm -f greenplum-db; ln -fs gpmaster greenplum-db
20150729:09:21:13:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /usr/local/greenplum-db
20150729:09:21:14:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: chown -R gpadmin:gpadmin /usr/local/gpmaster
20150729:09:21:15:029326 gpseginstall:bigdata03:root-[INFO]:-rm -f /usr/local/gpmaster.tar.gz
20150729:09:21:15:029326 gpseginstall:bigdata03:root-[INFO]:-Changing system passwords ...
20150729:09:21:17:029326 gpseginstall:bigdata03:root-[INFO]:-exchange ssh keys for user root
20150729:09:21:22:029326 gpseginstall:bigdata03:root-[INFO]:-exchange ssh keys for user gpadmin
20150729:09:21:30:029326 gpseginstall:bigdata03:root-[INFO]:-/usr/local/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin
20150729:09:21:30:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: . /usr/local/greenplum-db/./greenplum_path.sh; /usr/local/greenplum-db/./sbin/gpfixuserlimts -f /etc/security/limits.conf -u gpadmin
20150729:09:21:31:029326 gpseginstall:bigdata03:root-[INFO]:-version string on master: gpssh version 4.3.5.2 build 1
20150729:09:21:31:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: . /usr/local/greenplum-db/./greenplum_path.sh; /usr/local/greenplum-db/./bin/gpssh --version
20150729:09:21:32:029326 gpseginstall:bigdata03:root-[INFO]:-remote command: . /usr/local/gpmaster/greenplum_path.sh; /usr/local/gpmaster/bin/gpssh --version
20150729:09:21:38:029326 gpseginstall:bigdata03:root-[INFO]:-SUCCESS -- Requested commands completed
[root@bigdata03 ~]# 
--或者用gp自带的工具包测试能否无密码登陆已经安装包是否已经被解压到各节点上面,正常情况下会显示出各个节点的gphome信息
[root@bigdata03 ~]# gpssh -f hostfile_exkeys -e ls -l $GPHOME

4.创建各个节点的数据文件夹,并授权,保证数据文件夹是干净的
[root@bigdata03 data]# gpssh -f /tmp/hostfile_segments -e 'mkdir -p /data/primary'
[sdw4] mkdir -p /data/primary
[sdw3] mkdir -p /data/primary
[sdw5] mkdir -p /data/primary
[sdw1] mkdir -p /data/primary
[sdw6] mkdir -p /data/primary
[sdw2] mkdir -p /data/primary
[sdw7] mkdir -p /data/primary
[root@bigdata03 data]# gpssh -f /tmp/hostfile_segments -e 'chown gpadmin /data/primary'
[sdw4] chown gpadmin /data/primary
[sdw3] chown gpadmin /data/primary
[sdw5] chown gpadmin /data/primary
[sdw1] chown gpadmin /data/primary
[sdw6] chown gpadmin /data/primary
[sdw2] chown gpadmin /data/primary
[sdw7] chown gpadmin /data/primary

5.时钟同步
[root@bigdata03 ~]# vi /etc/ntp.conf
server 172.30.11.8

各个节点上的时钟以master为准,如04节点,需要改在第一行
[root@bigdata04 ~]# vi /etc/ntp.conf
server mdw

[root@bigdata03 ~]# gpssh -f /tmp/hostfile_exkeys -v -e 'ntpd'
[Reset ...]
[INFO] login sdw4
[INFO] login sdw3
[INFO] login mdw
[INFO] login sdw5
[INFO] login sdw1
[INFO] login sdw6
[INFO] login sdw2
[INFO] login sdw7
[sdw4] ntpd
[sdw3] ntpd
[ mdw] ntpd
[sdw5] ntpd
[sdw1] ntpd
[sdw6] ntpd
[sdw2] ntpd
[sdw7] ntpd
[INFO] completed successfully
[Cleanup...]
[root@bigdata03 ~]#

6.检查参数设置
检查参数设置,正常情况是这样的
[root@bigdata03 ~]# gpcheck -f /tmp/hostfile_exkeys -m mdw -s sdw1
20150729:11:18:20:001805 gpcheck:bigdata03:root-[INFO]:-dedupe hostnames
20150729:11:18:20:001805 gpcheck:bigdata03:root-[INFO]:-Detected platform: Generic Linux Cluster
20150729:11:18:20:001805 gpcheck:bigdata03:root-[INFO]:-generate data on servers
20150729:11:18:20:001805 gpcheck:bigdata03:root-[INFO]:-copy data files from servers
20150729:11:18:21:001805 gpcheck:bigdata03:root-[INFO]:-delete remote tmp files
20150729:11:18:21:001805 gpcheck:bigdata03:root-[INFO]:-Using gpcheck config file: /usr/local/greenplum-db/./etc/gpcheck.cnf
20150729:11:18:21:001805 gpcheck:bigdata03:root-[INFO]:-GPCHECK_NORMAL
20150729:11:18:21:001805 gpcheck:bigdata03:root-[INFO]:-gpcheck completing...
[root@bigdata03 ~]# 

7.检查网络
千兆的交换机,只能用千兆的网卡,网络吞吐一般
[root@bigdata03 ~]# gpcheckperf -f /tmp/hostfile_segments -r n -d /tmp >test.out
[root@bigdata03 ~]# more test.out 
/usr/local/greenplum-db/./bin/gpcheckperf -f /tmp/hostfile_segments -r n -d /tmp

-------------------
--  NETPERF TEST
-------------------

====================
==  RESULT
====================
Netperf bisection bandwidth test
sdw1 -> sdw2 = 845.140000
sdw2 -> sdw1 = 762.840000
sdw3 -> sdw4 = 932.170000
sdw4 -> sdw3 = 1021.450000
sdw5 -> sdw6 = 701.030000
sdw6 -> sdw5 = 806.280000
sdw7 -> sdw1 = 927.360000
sdw1 -> sdw7 = 1097.420000

Summary:
sum = 7093.69 MB/sec
min = 701.03 MB/sec
max = 1097.42 MB/sec
avg = 886.71 MB/sec
median = 927.36 MB/sec

[Warning] connection between sdw1 and sdw2 is no good
[Warning] connection between sdw2 and sdw1 is no good
[Warning] connection between sdw3 and sdw4 is no good
[Warning] connection between sdw5 and sdw6 is no good
[Warning] connection between sdw6 and sdw5 is no good
[Warning] connection between sdw7 and sdw1 is no good
[root@bigdata03 ~]#

8.检查io
可以选其中几个节点测试,它会创建几个大文件来测试
[root@bigdata03 .ssh]# more /tmp/hostfile_2 
sdw1
sdw2
sdw3
[root@bigdata03 ~]# gpcheckperf  -f /tmp/hostfile_2 -r ds -D -d /data/primary/ -d /data/primary/ -d /data/primary/
/usr/local/greenplum-db/./bin/gpcheckperf -f /tmp/hostfile_2 -r ds -D -d /data/primary/ -d /data/primary/ -d /data/primary/

--------------------
--  DISK WRITE TEST
--------------------

--------------------
--  DISK READ TEST
--------------------

--------------------
--  STREAM TEST
--------------------

====================
==  RESULT
====================

 disk write avg time (sec): 1573.83
 disk write tot bytes: 379920384000
 disk write tot bandwidth (MB/s): 233.53
 disk write min bandwidth (MB/s): 65.47 [sdw2]
 disk write max bandwidth (MB/s): 86.37 [sdw1]
 -- per host bandwidth --
    disk write bandwidth (MB/s): 86.37 [sdw1]
    disk write bandwidth (MB/s): 65.47 [sdw2]
    disk write bandwidth (MB/s): 81.69 [sdw3]

 disk read avg time (sec): 17.75
 disk read tot bytes: 379920384000
 disk read tot bandwidth (MB/s): 20440.61
 disk read min bandwidth (MB/s): 6588.84 [sdw2]
 disk read max bandwidth (MB/s): 7142.13 [sdw3]
 -- per host bandwidth --
    disk read bandwidth (MB/s): 6709.64 [sdw1]
    disk read bandwidth (MB/s): 6588.84 [sdw2]
    disk read bandwidth (MB/s): 7142.13 [sdw3]

 stream tot bandwidth (MB/s): 12247.97
 stream min bandwidth (MB/s): 3392.68 [sdw3]
 stream max bandwidth (MB/s): 5069.60 [sdw2]
 -- per host bandwidth --
    stream bandwidth (MB/s): 3785.69 [sdw1]
    stream bandwidth (MB/s): 5069.60 [sdw2]
    stream bandwidth (MB/s): 3392.68 [sdw3]
四、集群初始化
做了那么多的铺垫准备后,进入真正的安装环节
在master上以gpadmin用户登陆
[root@bigdata03 ~]# su - gpadmin
[gpadmin@bigdata03 ~]$ source /usr/local/gpmaster/greenplum_path.sh
[gpadmin@bigdata03 ~]$ mkdir gpconfigs
[gpadmin@bigdata03 ~]$ cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /home/gpadmin/gpconfigs/gpinitsystem_config

配置gpinitsystem_config文件,每个segment上1个数据文件夹,因为只有1块网卡,没有配置镜像
declare -a DATA_DIRECTORY=(/data/primary)
MASTER_PORT=1949
CHECK_POINT_SEGMENTS=64
ENCODING=UTF8

初始化
[gpadmin@bigdata03 gpconfigs]$ gpinitsystem -c gpconfigs/gpinitsystem_config -h /tmp/hostfile_segments
20150729:15:41:27:030870 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20150729:15:41:27:gpinitsystem:bigdata03:gpadmin-[FATAL]:-Configuration file gpconfigs/gpinitsystem_config does not exist. Script Exiting!
[gpadmin@bigdata03 gpconfigs]$ cd ..
[gpadmin@bigdata03 ~]$ gpinitsystem -c gpconfigs/gpinitsystem_config -h /tmp/hostfile_segments
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Reading Greenplum configuration file gpconfigs/gpinitsystem_config
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Locale has not been set in gpconfigs/gpinitsystem_config, will set to default value
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Locale set to en_US.utf8
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[WARN]:-Master hostname mdw does not match hostname output
20150730:16:52:55:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking to see if mdw can be resolved on this host
20150730:16:52:56:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Can resolve mdw to this host
20150730:16:52:56:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-No DATABASE_NAME set, will exit following template1 updates
20150730:16:52:56:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250
20150730:16:52:56:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking configuration parameters, Completed
20150730:16:52:56:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
.......
20150730:16:52:58:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Configuring build for standard array
20150730:16:52:58:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Commencing multi-home checks, Completed
20150730:16:52:58:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Building primary segment instance array, please wait...
.......
20150730:16:53:03:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking Master host
20150730:16:53:03:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking new segment hosts, please wait...
.......
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checking new segment hosts, Completed
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Greenplum Database Creation Parameters
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:---------------------------------------
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master Configuration
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:---------------------------------------
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master instance name       = EMC Greenplum DW
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master hostname            = mdw
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master port                = 1949
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master instance dir        = /data/master/gpseg-1
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master LOCALE              = en_US.utf8
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Greenplum segment prefix   = gpseg
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master Database            = 
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master connections         = 250
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master buffers             = 128000kB
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Segment connections        = 750
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Segment buffers            = 128000kB
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Checkpoint segments        = 64
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Encoding                   = UTF8
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Postgres param file        = Off
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Initdb to be used          = /usr/local/greenplum-db/bin/initdb
20150730:16:53:19:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-GP_LIBRARY_PATH is         = /usr/local/greenplum-db/lib
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Ulimit check               = Passed
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Array host connect type    = Single hostname per node
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master IP address [1]      = ::1
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master IP address [2]      = 172.30.13.203
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Master IP address [3]      = fe80::5054:ff:fec7:b4f5
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Standby Master             = Not Configured
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Primary segment #          = 1
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Total Database segments    = 7
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Trusted shell              = ssh
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Number segment hosts       = 7
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Mirroring config           = OFF
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:----------------------------------------
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Greenplum Primary Segment Configuration
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:----------------------------------------
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw1 	/data/primary/gpseg0 	40000 	2 	0
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw2 	/data/primary/gpseg1 	40000 	3 	1
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw3 	/data/primary/gpseg2 	40000 	4 	2
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw4 	/data/primary/gpseg3 	40000 	5 	3
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw5 	/data/primary/gpseg4 	40000 	6 	4
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw6 	/data/primary/gpseg5 	40000 	7 	5
20150730:16:53:20:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-sdw7 	/data/primary/gpseg6 	40000 	8 	6
Continue with Greenplum creation Yy/Nn>
y
20150730:16:53:29:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Building the Master instance database, please wait...
20150730:16:54:21:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Starting the Master in admin mode
20150730:16:54:32:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Commencing parallel build of primary segment instances
20150730:16:54:32:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Spawning parallel processes    batch [1], please wait...
.......
20150730:16:54:32:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...
................................................................................................................
20150730:16:56:25:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:------------------------------------------------
20150730:16:56:25:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Parallel process exit status
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:------------------------------------------------
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Total processes marked as completed           = 7
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Total processes marked as killed              = 0
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Total processes marked as failed              = 0
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:------------------------------------------------
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Deleting distributed backout files
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Removing back out file
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-No errors generated from parallel processes
20150730:16:56:26:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode
20150730:16:56:26:022809 gpstop:bigdata03:gpadmin-[INFO]:-Starting gpstop with args: -a -i -m -d /data/master/gpseg-1
20150730:16:56:26:022809 gpstop:bigdata03:gpadmin-[INFO]:-Gathering information and validating the environment...
20150730:16:56:26:022809 gpstop:bigdata03:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20150730:16:56:26:022809 gpstop:bigdata03:gpadmin-[INFO]:-Obtaining Segment details from master...
20150730:16:56:26:022809 gpstop:bigdata03:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.5.2 build 1'
20150730:16:56:27:022809 gpstop:bigdata03:gpadmin-[INFO]:-There are 0 connections to the database
20150730:16:56:27:022809 gpstop:bigdata03:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate'
20150730:16:56:27:022809 gpstop:bigdata03:gpadmin-[INFO]:-Master host=bigdata03.rdchz
20150730:16:56:27:022809 gpstop:bigdata03:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate
20150730:16:56:27:022809 gpstop:bigdata03:gpadmin-[INFO]:-Master segment instance directory=/data/master/gpseg-1
20150730:16:56:28:022809 gpstop:bigdata03:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process
20150730:16:56:28:022809 gpstop:bigdata03:gpadmin-[INFO]:-Terminating processes for segment /data/master/gpseg-1
20150730:16:56:28:022899 gpstart:bigdata03:gpadmin-[INFO]:-Starting gpstart with args: -a -d /data/master/gpseg-1
20150730:16:56:28:022899 gpstart:bigdata03:gpadmin-[INFO]:-Gathering information and validating the environment...
20150730:16:56:28:022899 gpstart:bigdata03:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.5.2 build 1'
20150730:16:56:28:022899 gpstart:bigdata03:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'
20150730:16:56:28:022899 gpstart:bigdata03:gpadmin-[INFO]:-Starting Master instance in admin mode
20150730:16:56:29:022899 gpstart:bigdata03:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20150730:16:56:29:022899 gpstart:bigdata03:gpadmin-[INFO]:-Obtaining Segment details from master...
20150730:16:56:29:022899 gpstart:bigdata03:gpadmin-[INFO]:-Setting new master era
20150730:16:56:29:022899 gpstart:bigdata03:gpadmin-[INFO]:-Master Started...
20150730:16:56:29:022899 gpstart:bigdata03:gpadmin-[INFO]:-Shutting down master
20150730:16:56:31:022899 gpstart:bigdata03:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
... 
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-Process results...
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-----------------------------------------------------
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-   Successful segment starts                                            = 7
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-   Failed segment starts                                                = 0
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-----------------------------------------------------
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-Successfully started 7 of 7 segment instances 
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-----------------------------------------------------
20150730:16:56:34:022899 gpstart:bigdata03:gpadmin-[INFO]:-Starting Master instance bigdata03.rdchz directory /data/master/gpseg-1 
20150730:16:56:35:022899 gpstart:bigdata03:gpadmin-[INFO]:-Command pg_ctl reports Master bigdata03.rdchz instance active
20150730:16:56:35:022899 gpstart:bigdata03:gpadmin-[INFO]:-No standby master configured.  skipping...
20150730:16:56:35:022899 gpstart:bigdata03:gpadmin-[INFO]:-Database successfully started
20150730:16:56:35:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode
20150730:16:56:35:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Loading gp_toolkit...
20150730:16:56:38:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Scanning utility log file for any warning messages
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[WARN]:-*******************************************************
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[WARN]:-were generated during the array creation
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Please review contents of log file
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20150730.log
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-To determine level of criticality
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-These messages could be from a previous run of the utility
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-that was called today!
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[WARN]:-*******************************************************
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Greenplum Database instance successfully created
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-------------------------------------------------------
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-To complete the environment configuration, please 
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-update gpadmin .bashrc file with the following
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data/master/gpseg-1"
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-   to access the Greenplum scripts for this instance:
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-   or, use -d /data/master/gpseg-1 option for the Greenplum scripts
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-   Example gpstate -d /data/master/gpseg-1
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20150730.log
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Review options for gpinitstandby
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-------------------------------------------------------
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-The Master /data/master/gpseg-1/pg_hba.conf post gpinitsystem
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-has been configured to allow all hosts within this new
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-new array must be explicitly added to this file
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is
20150730:16:56:39:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-located in the /usr/local/greenplum-db/docs directory
20150730:16:56:40:031413 gpinitsystem:bigdata03:gpadmin-[INFO]:-------------------------------------------------------
[gpadmin@bigdata03 ~]$

连接
[gpadmin@bigdata03 ~]$ psql -p 1949 -d postgres
psql (8.2.15)
Type "help" for help.

postgres=# \l
                  List of databases
   Name    |  Owner  | Encoding |  Access privileges  
-----------+---------+----------+---------------------
 postgres  | gpadmin | UTF8     | 
 template0 | gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=CTc/gpadmin
 template1 | gpadmin | UTF8     | =c/gpadmin          
                                : gpadmin=CTc/gpadmin
(3 rows)

postgres=# \q
[gpadmin@bigdata03 ~]$

关闭与启动
关闭与启动
[gpadmin@bigdata03 ~]$ gpstart
[gpadmin@bigdata03 ~]$ gpstop -M fast

© 著作权归作者所有

共有 人打赏支持
kenyon_君羊
粉丝 499
博文 170
码字总数 121714
作品 0
杭州
其他
私信 提问
加载中

评论(7)

YuanyuanL
YuanyuanL
点个赞!79
kenyon_君羊
kenyon_君羊

引用来自“guoyuanlin”的评论

楼主好!
想咨询两个问题:
1.如果其中的一台数据结点宕机,整个集群服务是不是会中止呢?因为数据是分片存储的,所以担心这个问题;
2.这 gp 集群可以做成多主的模式吗?就是想实现多主写入,因为单点写入会存在业务中断的情形,多谢。
1.单节点的会影响集群,建议加mirror 2.没看到实现过
g
guoyuanlin
楼主好!
想咨询两个问题:
1.如果其中的一台数据结点宕机,整个集群服务是不是会中止呢?因为数据是分片存储的,所以担心这个问题;
2.这 gp 集群可以做成多主的模式吗?就是想实现多主写入,因为单点写入会存在业务中断的情形,多谢。
kenyon_君羊
kenyon_君羊

引用来自“francs”的评论

Greenplumn 好用,但用的 PostgreSQL 版本太老了, 8.2.15

引用来自“kenyon_君羊”的评论

他基于的postgresql版本改动很大的

引用来自“宏哥”的评论

使用场景是?
数据仓库,OLAP
宏哥
宏哥

引用来自“francs”的评论

Greenplumn 好用,但用的 PostgreSQL 版本太老了, 8.2.15

引用来自“kenyon_君羊”的评论

他基于的postgresql版本改动很大的
使用场景是?
kenyon_君羊
kenyon_君羊

引用来自“francs”的评论

Greenplumn 好用,但用的 PostgreSQL 版本太老了, 8.2.15
他基于的postgresql版本改动很大的
francs
francs
Greenplumn 好用,但用的 PostgreSQL 版本太老了, 8.2.15
【干货】在docker中安装配置Greenplum集群的过程

—— 原文发布于本人的微信公众号“大数据与人工智能Lab”(BigdataAILab),欢迎关注。 Greenplum是一个MPP(海量并行处理)计算框架的分布式数据库,其数据库引擎层是基于著名的Postgresq...

雪饼
2018/01/12
4
0
Installation GreenPlum 5.14.0 on Oracle Linux 7.6

Greenplum主要由Master节点、Segment节点、interconnect三大部分组成。Greenplum master是Greenplum数据库系统的入口,接受客户端连接及提交的SQL语句,将工作负载分发给其它数据库实例(seg...

candon123
2018/12/07
0
0
greenplum分布式集群(数据仓库)实战

1.准备环境 1.1集群介绍 系统环境:centos6.5 数据库版本:greenplum-db-4.3.3.1-build-1-RHEL5-x86_64.zip greenplum集群中,4台机器IP分别是 [root@dw-greenplum-1 ~]# cat /etc/hosts 12...

jxzhfei
2016/04/23
0
0
Greenplum 在Linux环境安装

环境说明 一 环境准备(需在所有的服务器做相同的配置) 二、安装greenplum 三、配置greenplum参数文件 四、服务器检测(在master上执行) 五、启动greenplum(在master上操作)...

沐龙
2018/04/26
0
0
greenplum集群安装与增加节点生产环境实战

greenplum集群安装与增加节点生产环境实战 1.准备环境 1.1集群介绍 系统环境:centos6.5 数据库版本:greenplum-db-4.3.3.1-build-1-RHEL5-x86_64.zip greenplum集群中,2台机器IP分别是 [roo...

jxzhfei
2017/12/30
0
0

没有更多内容

加载失败,请刷新页面

加载更多

Coding and Paper Letter(四十五)

资源整理。 1 Coding: 1.Python库gempy,一种基于Python的开源三维结构地质建模软件,它允许从界面和方向数据隐式(即自动)创建复杂的地质模型。 它还支持随机建模以解决参数和模型的不确定...

胖胖雕
19分钟前
0
0
golang 声明一个指定长度的数组,用于后续添加

很多时候我们需要声明一个指定长度的数组,用于后续添加.在使用go的时候要注意,下面的第一个例子会有报错 "non-constant array bound",应该使用第二个例子. Length 是动态的值 有报错的例子 ...

漫步海边小路
21分钟前
0
0
Java NIO示例

Server端 /** * 《构建高性能的大型分布式Java应用》 * 书中的示例代码 * 版权所有 2008---2009 */package book.chapter1.tcpnio;import java.net.InetSocketAddress;i...

月下狼
27分钟前
0
0
发布xxl-job executor dotnet core 执行器的实现

DotXxlJob [github][https://github.com/xuanye/DotXxlJob] xxl-job的dotnet core 执行器实现,支持XXL-JOB 2.0+ 1 XXL-JOB概述 [XXL-JOB][1]是一个轻量级分布式任务调度平台,其核心设计目标...

假正经哥哥
今天
2
0
mysql 查询当天、本周,本月,上一个月的数据

今天 select * from 表名 where to_days(时间字段名) = to_days(now()); 昨天 SELECT * FROM 表名 WHERE TO_DAYS( NOW( ) ) - TO_DAYS( 时间字段名) <= 1 近7天 SELECT * FROM 表名 wher......

BraveLN
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部