硬件服務器用到某私有云中ip段爲192.168.228.111-192.168.228.120的十臺服務器,相關主要配置以下表:node
類別linux |
主機名算法 |
IPsql |
內存shell |
硬盤數據庫 |
主要目錄安全 |
備註bash |
Master服務器 |
mdwcookie |
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 |
鏡像 |
全部節點均爲RedHat Linux(Red Hat Enterprise Linux Server release 6.0 (Santiago),查看方法:more /etc/issue)
狀況容許的狀況下可將master節點的名稱改成mdw,standby節點改成smdw,segment改成sdw+n(n爲阿拉伯數字)。修改後的效果爲:
狀況以下(節選):
[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-BPU11爲master節點,GDY-BPU12爲standby節點,GDY-BPU13-GDY-BPU20均爲第一批segment節點;GDY-BPU03-GDY-BPU10爲備用節點。
[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 ~]#
[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 ~]#
主機名的狀況同host文件,故在本文檔中主機名的設置也暫時不作處理。
狀況容許的狀況下可將master主機的名稱改成mdw,standby主機改成smdw,segment改成sdw+n(n爲阿拉伯數字)。修改完成後需重啓機器。修改效果爲:
[root@mdw ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mdw
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 ~]#
[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 ~]#
[root@GDY-BPU11 ~]# mkdir -p /gpdb/app
[root@GDY-BPU11 ~]# chown -R gpadmin:gpadmin /gpdb/
[root@GDY-BPU11 ~]#
將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]#
[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]#
[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 ~]$
爲了方便管理以及節點間互信,須要編輯節點信息文件。
節點文件包括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]$
*因爲生產環境的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 $
...
修改完畢後,重啓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 ~]$
經過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 ~]$
[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 的用戶的屬組
根據存儲掛載記錄所規劃的方案進行文件掛載
建立須要掛載的文件夾(建立於根目錄下):
[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 ~]#
每一個節點分別建立目錄。
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
[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 ~]$
在初始化數據庫以前,須要進行先決條件檢查,主要檢查磁盤I/O能力、網絡帶寬、內核參數、limit等條件是否知足GreenPlum數據庫的要求。
從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服務器文件)
[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 ~]$
[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 ~]$
[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 ~]$
[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 ~]$
全部配置同其餘節點。
執行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 ~]$
在https://www.postgresql.org/download/上下載
postgresql96-9.6.2-1PGDG.rhel6.x86_64.rpm(客戶端)和
postgresql96-libs-9.6.2-1PGDG.rhel6.x86_64.rpm(依賴包)。
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 ~]#
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]#