第一章 文件概述
本文描述適用於Greenplum4.0以上版本的安裝操作。所涉及到的作業系統相關引數調整,主要針對Redhat Linux作業系統。
第二章 安裝介質
作業系統:CentOS release 6.5 (Final)。
Greenplum安裝版本:greenplum-db-4.3.8.1-build-2-RHEL5-x86_64.zip
第三章 安裝前準備
3.1、網路規劃
建議在Greenplum資料庫系統安裝之前,把網路配置規劃好
3.2、儲存空間規劃
首先,需要評估目標資料庫資料所需要的空間容量。建議瞭解客戶搭建Greenplum資料庫的具體應用。
舉例:估計資料庫所需空間為U,資料庫需要啟用Mirror,磁碟陣列總可用空間為D(Raid之後)。空間規劃服務和如下公式:
2 * U + U / 3 = D * 70%
磁碟空間D平均分配到各個Segment伺服器上。
Master需要相應的空間。使用伺服器內建硬碟的計算方式類似。
3.3、資料庫例項規劃
規劃每個Segment伺服器上建立的資料庫例項的數量(instance數量),通常建議每2個CPU核心(core)對應一個資料庫例項
第四章 作業系統設定
4.1 、設定主機名
修改各臺主機的主機名稱。一般建議的命名規則如下:
Master:mdw
Standby Master:smdw
Segment Host:sdw1、sdw2……sdwn
修改操作:
1、hostname mdw 2、修改 /etc/sysconfig/network 配置檔案中的hostname
4.2 、設定hosts解析(所有節點,Master和Segments)
通常Master和Standby Master主機都配置外部IP和內部IP。Segment主機可只配置內部IP。所有主機的hosts檔案內容必須保持一致
127.0.0.1 mdw localhost localhost.localdomain localhost4 localhost4.localdomain4 192.168.1.201 mdw 192.168.1.202 sdw1 192.168.1.203 sdw2
4.3、安裝依賴軟體(所有節點,Master和Segments)
yum -y install ed rsync coreutils glib2 lrzsz sysstat e4fsprogs xfsprogs ntp readline-devel zlib zlib-devel openssl openssl-devel pam-devel libxml2-devel libxslt-devel python-devel tcl-devel gcc make smartmontools flex bison OpenIPMI-tools openldap openldap-devel logrotate python-py gcc-c++ apr-devel libcurl-devel bzip2-devel libyaml-devel openssh-clients
【涉及機器】:所有伺服器關閉防火牆
service iptables stop
chkconfig iptables off
service ip6tables stop
chkconfig ip6tables off
4.4、配置NTP時間同步(所有節點)
使用root使用者進行操作,涉及所有伺服器。
Greenplum推薦使用NTP(Network Time Protocol)同步各臺主機的時鐘。建議設定一臺獨立的時鐘伺服器。例如時鐘伺服器IP為10.6.220.20
4.4.1、Master伺服器配置與時鐘伺服器同步。
修改配置檔案/etc/ntp.conf後,啟動ntpd服務。舉例:配置檔案增加:
server 10.6.220.20
啟動NTP服務:
service ntpd start;chkconfig ntpd on
#如果沒有獨立的時鐘伺服器,則應該以Master伺服器做內部的時鐘伺服器,Master就可以不用修改ntp.conf配置檔案,直接啟動ntpd服務即可。
4.4.2、所有Segment伺服器優先與Master伺服器同步,其次與Standby Master伺服器同步。
修改配置檔案/etc/ntp.conf後,重啟ntpd服務。配置檔案增加:
server mdw prefer
server smdw
啟動服務:
service ntpd start;chkconfig ntpd on
4.4.3、Standby Master伺服器優先與Master伺服器,其次與始終伺服器同步。
修改配置檔案/etc/ntp.conf後,重啟ntpd服務。配置檔案增加:
server mdw prefer server 10.6.220.20
啟動服務:
service ntpd start;chkconfig ntpd on
#如果沒有獨立的時鐘伺服器,第二行不用配置。
4.5 修改系統引數(Redhat)
【涉及機器】:所有伺服器;使用root使用者進行修改,重啟後生效。
4.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 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.core.netdev_max_backlog = 10000 vm.overcommit_memory = 2 kernel.msgmni = 2048 net.ipv4.ip_local_port_range = 1025 65535
4.5.2、修改系統引數/etc/security/limits.conf
Linux PAM中 pam_limits.so 的配置檔案
* soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072
4.5.3、修改磁碟預讀引數(所有節點,Master和Segments)
通過修改預讀扇區數,可以有效磁碟的讀效能,特別是順序讀,GPDB資料庫要求最小磁碟扇區數為16384,建議設定為65535。
在引數檔案/etc/rc.d/rc.local中增加;
blockdev --setra 65535 /dev/sd
4.5.4、修改配置/boot/grub/menu.lst
Linux預設的I/O排程模式是CFQ,通常需要修改I/O排程策略為deadline,可以通過下面的命令檢視I/O排程策略。
cat /sys/block/sda/queue/scheduler
#臨時修改
echo deadline > /sys/block/sda/queue/scheduler
如果永久修改I/O排程策略,則需要修改/boot/grub/menu.lst檔案,在“kernel*”行後面增加elevator=deadline。
4.5.5、修改配置/etc/sysconfig/i18n
增加RC_LANG=en_US.UTF-8
4.6、啟動IPMI服務
(IPMI(Intelligent Platform Management Interface)即智慧平臺管理介面是使硬體管理具備“智慧化”的新一代通用介面標準。如果沒有安裝相關服務,建議安裝)
service ipmi start;chkconfig ipmi on
第五章 配置使用者和資料目錄
5.1、建立gpadmin使用者(所有節點,Master和Segments)
[root@mdw ~]# groupadd -g 520 gpadmin [root@mdw ~]# useradd -u 520 -g gpadmin gpadmin [root@mdw ~]# passwd gpadmin Changing password for user gpadmin. New password: BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully.
5.2、建立軟體安裝目錄(所有節點,Master和Segments)
[root@mdw ~]# mkdir -p /gpdb/app
[root@mdw ~]# chown -R gpadmin:gpadmin /gpdb/
/gpdb目錄為GPDB的BASE目錄,/gpdb/app為GPDB的HOME目錄。
第六章 安裝Greenplum
6.1、上傳並解壓GPDB安裝檔案(僅Master節點)
[gpadmin@mdw gpdb]$ unzip greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.zip Archive: greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.zip inflating: README_INSTALL inflating: greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.bin [gpadmin@mdw gpdb]$ ll total 278668 drwxr-xr-x. 2 gpadmin gpadmin 4096 Mar 29 00:07 app -rwxr-xr-x. 1 gpadmin gpadmin 143791566 Apr 20 2016 greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.bin -rw-r--r--. 1 gpadmin gpadmin 141547878 Mar 28 16:02 greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.zip -rw-r--r--. 1 gpadmin gpadmin 6997 Apr 20 2016 README_INSTALL
6.2、執行安裝檔案
gpadmin@mdw gpdb]$ ./greenplum-db-4.3.8.1-build-1-RHEL5-x86_64.bin 下面是許可資訊後面的內容 ******************************************************************************** You must read and accept the Pivotal Database license agreement before installing ******************************************************************************** *** IMPORTANT INFORMATION - PLEASE READ CAREFULLY *** PIVOTAL GREENPLUM DATABASE END USER LICENSE AGREEMENT IMPORTANT - READ CAREFULLY: This Software contains computer programs and other proprietary material and information, the use of which is subject to and expressly conditioned upon acceptance of this End User License Agreement ("EULA"). This EULA is a legally binding document between you (meaning the person or the entity that obtained the Software under the terms and conditions of this EULA, is agreeing to be bound by the terms and conditions of this EULA, and is referred to below as "You" or "Customer") and Pivotal (meaning (i) Pivotal Software, Inc., if Customer is located in the United States; and (ii) the local Pivotal sales subsidiary, if Customer is located in a country outside the United States in which Pivotal has a local sales subsidiary; and (iii) GoPivotal International Limited, if Customer is located in a country outside the United States in which Pivotal does not have a local sales subsidiary (in each case, referred to herein as "Pivotal"). Unless Customer has entered into a written and separately signed agreement with Pivotal that is currently in effect with respect to the license of the Software and provision of Support Services and Subscription Services, this EULA governs Customer's use of the Software and the provision of Support Services and Subscription Services. Capitalized terms have the meaning stated in the EULA. ............ 必須輸入YES才可繼續安裝。 ******************************************************************************** Do you accept the Pivotal Database license agreement? [yes|no] ******************************************************************************** yes 預設GPDB的安裝路徑為/usr/local/greenplum-db-**,確認需要輸入YES,如果需要安裝到其他路徑,直接輸入要按照的路徑即可 ******************************************************************************** Provide the installation path for Greenplum Database or press ENTER to accept the default installation path: /usr/local/greenplum-db-4.3.8.1 ******************************************************************************** /gpdb/app ******************************************************************************** Install Greenplum Database into </gpdb/app>? [yes|no] ******************************************************************************** yes Extracting product to /gpdb/app
安裝完成;安裝完成會在/gpdb/app目錄下生成以下檔案。
[gpadmin@mdw gpdb]$ cd app [gpadmin@mdw app]$ ll total 276 drwxr-xr-x. 4 gpadmin gpadmin 4096 Apr 20 2016 bin drwxr-xr-x. 2 gpadmin gpadmin 4096 Apr 20 2016 demo drwxr-xr-x. 5 gpadmin gpadmin 4096 Apr 20 2016 docs drwxr-xr-x. 2 gpadmin gpadmin 4096 Apr 20 2016 etc drwxr-xr-x. 3 gpadmin gpadmin 4096 Apr 20 2016 ext -rw-r--r--. 1 gpadmin gpadmin 43025 Apr 20 2016 GPDB-LICENSE.txt -rw-rw-r--. 1 gpadmin gpadmin 713 Mar 29 00:12 greenplum_path.sh drwxr-xr-x. 6 gpadmin gpadmin 4096 Apr 20 2016 include drwxr-xr-x. 9 gpadmin gpadmin 4096 Apr 20 2016 lib -rw-r--r--. 1 gpadmin gpadmin 192912 Apr 20 2016 LICENSE.thirdparty drwxr-xr-x. 2 gpadmin gpadmin 4096 Apr 20 2016 sbin drwxr-xr-x. 4 gpadmin gpadmin 4096 Apr 20 2016 share
6.3、設定GPDB環境變數(僅Master節點)
安裝完成後修改gpadmin使用者home的~/.bashrc配置檔案,增加
source /gpdb/app/greenplum_path.sh
6.4、配置hostname檔案(用於建立多機信任)
編輯節點資訊檔案(僅Master節點)。為了管理方便,在app目錄下建立config資料夾,將節點資訊檔案存放在該目錄下。需要建立兩個檔案,其中一個檔案(hostlist)存放所有節點資訊,seg_host檔案只存放segment節點資訊
[gpadmin@mdw app]$ mkdir config
[gpadmin@mdw app]$ cd config
[gpadmin@mdw config]$ cat hostlist
mdw
sdw1
sdw2
[gpadmin@mdw config]$ cat seg_host
sdw1
sdw2
6.5、打通所有節點直接的互信(僅Master節點)
GreenPlum資料庫提供gpssh-exkeys工具來開啟所有節點直接的互信關係,非常方便
[gpadmin@mdw config]$ gpssh-exkeys -f hostlist [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 mdw ... send to sdw1 *** *** Enter password for sdw1: ... send to sdw2 [STEP 4 of 5] determine common authentication file content [STEP 5 of 5] copy authentication files to all remote hosts ... finished key exchange with mdw ... finished key exchange with sdw1 ... finished key exchange with sdw2 [INFO] completed successfully
互信配置完成後,可以通過gpssh工具來驗證互信是否成功配置,-e引數後面的是遠端登入節點後執行的命令。通過gpssh工具可以在所有節點執行同一命令,非常方便(後續會用到)。
[gpadmin@mdw config]$ gpssh -f /gpdb/app/config/hostlist -e 'pwd' [ mdw] pwd [ mdw] /home/gpadmin [sdw2] pwd [sdw2] /home/gpadmin [sdw1] pwd [sdw1] /home/gpadmin
6.6、Segment節點安裝GreenPlum軟體(僅Master節點)
通過gpseginstall命令安裝segment軟體,使用-u引數指定安裝使用者,-p引數指定安裝使用者的密碼,這樣將不再需要互動式輸入密碼。
[gpadmin@mdw config]$ gpseginstall -f hostlist -u gpadmin -p li0924 20180329:00:16:00:018760 gpseginstall:mdw:gpadmin-[INFO]:-Installation Info: link_name greenplum-db binary_path /gpdb/app binary_dir_location /gpdb binary_dir_name app 20180329:00:16:00:018760 gpseginstall:mdw:gpadmin-[INFO]:-check cluster password access 20180329:00:16:00:018760 gpseginstall:mdw:gpadmin-[INFO]:-de-duplicate hostnames 20180329:00:16:00:018760 gpseginstall:mdw:gpadmin-[INFO]:-master hostname: mdw 20180329:00:16:01:018760 gpseginstall:mdw:gpadmin-[INFO]:-rm -f /gpdb/app.tar; rm -f /gpdb/app.tar.gz 20180329:00:16:01:018760 gpseginstall:mdw:gpadmin-[INFO]:-cd /gpdb; tar cf app.tar app 20180329:00:16:10:018760 gpseginstall:mdw:gpadmin-[INFO]:-gzip /gpdb/app.tar 20180329:00:16:35:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: mkdir -p /gpdb 20180329:00:16:35:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: rm -rf /gpdb/app 20180329:00:16:35:018760 gpseginstall:mdw:gpadmin-[INFO]:-scp software to remote location 20180329:00:16:39:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: gzip -f -d /gpdb/app.tar.gz 20180329:00:16:58:018760 gpseginstall:mdw:gpadmin-[INFO]:-md5 check on remote location 20180329:00:17:02:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: cd /gpdb; tar xf app.tar 20180329:00:17:10:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: rm -f /gpdb/app.tar 20180329:00:17:12:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: cd /gpdb; rm -f greenplum-db; ln -fs app greenplum-db 20180329:00:17:13:018760 gpseginstall:mdw:gpadmin-[INFO]:-rm -f /gpdb/app.tar.gz 20180329:00:17:13:018760 gpseginstall:mdw:gpadmin-[INFO]:-version string on master: gpssh version 4.3.8.1 build 1 20180329:00:17:13:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: . /gpdb/greenplum-db/./greenplum_path.sh; /gpdb/greenplum-db/./bin/gpssh --version 20180329:00:17:13:018760 gpseginstall:mdw:gpadmin-[INFO]:-remote command: . /gpdb/app/greenplum_path.sh; /gpdb/app/bin/gpssh --version 20180329:00:17:19:018760 gpseginstall:mdw:gpadmin-[INFO]:-SUCCESS -- Requested commands completed
Segment節點會根據Master節點的安裝路徑安裝GreenPlum軟體,目錄結構和Master一模一樣。
6.7、 Segment節點配置環境變數(所有Segment節點)
修改gpadmin使用者home的~/.bashrc配置檔案,增加
source /gpdb/app/greenplum_path.sh
第七章 資料庫的初始化
7.1、建立資料檔案存放目錄(所有節點)
[root@mdw ~]# mkdir -p /data/gpdata/master [root@mdw ~]# chown -R gpadmin:gpadmin /data [root@sdw1 ~]# mkdir -p /data/gpdata/primary [root@sdw1 ~]# mkdir -p /data/gpdata/mirror [root@sdw1 ~]# chown -R gpadmin:gpadmin /data
本案例Master節點的資料檔案存放在/data/gpdata/master目錄,Segment節點的主資料檔案存放在/data/gpdata/primary目錄;映象資料檔案放在/data/gpdata/mirror目錄
7.2、配置時間同步(所有節點)
本案例Master節點的伺服器配置為NTP的服務端,Segment節點為NTP的客戶端。Master節點使用root使用者通過gpssh工具批量呼叫date命令對比各伺服器的時間是否一致。
[gpadmin@mdw ~]$ gpssh -f /gpdb/app/config/hostlist Note: command history unsupported on this machine ... => date [sdw1] Wed Mar 28 17:51:36 CST 2018 [ mdw] Wed Mar 28 17:51:36 CST 2018 [sdw2] Wed Mar 28 17:51:36 CST 2018
7.3、系統檢查(僅Master節點)
在初始化資料庫之前,需要進行先決條件檢查,主要檢查磁碟I/O能力、網路頻寬、核心引數、limit等條件是否滿足GreenPlum資料庫的要求。
引數配置檢查
[gpadmin@mdw ~]$ gpcheck -f /gpdb/app/config/hostlist -m mdw 20180328:17:58:36:001300 gpcheck:mdw:gpadmin-[INFO]:-dedupe hostnames 20180328:17:58:37:001300 gpcheck:mdw:gpadmin-[INFO]:-Detected platform: Generic Linux Cluster 20180328:17:58:37:001300 gpcheck:mdw:gpadmin-[INFO]:-generate data on servers 20180328:17:58:38:001300 gpcheck:mdw:gpadmin-[INFO]:-copy data files from servers 20180328:17:58:39:001300 gpcheck:mdw:gpadmin-[INFO]:-delete remote tmp files 20180328:17:58:39:001300 gpcheck:mdw:gpadmin-[INFO]:-Using gpcheck config file: /gpdb/greenplum-db/./etc/gpcheck.cnf 20180328:17:58:39:001300 gpcheck:mdw:gpadmin-[ERROR]:-GPCHECK_ERROR host(None): utility will not check all settings when run as non-root user 20180328:17:58:39:001300 gpcheck:mdw:gpadmin-[INFO]:-gpcheck completing...
引數效能檢查
1 引數配置檢查 gpcheck -f /gpdb/app/config/hostlist -m mdw -s smdw 核對並修改下你感應系統引數。 2 效能檢查 2.1 網路效能檢查 gpcheckperf -f /gpdb/app/config/hostlist -r N -d /tmp > checknetwork.out 2.2 磁碟效能檢查 gpcheckperf -f /gpdb/app/config/hostlist -r ds -D -d /data/gpdata/primary -d /data/gpdata/mirror r > checkio.out 檢查磁碟IO的目標目錄是資料庫的資料檔案目錄,測試工具會寫入系統記憶體的兩倍大小的資料量。
7.4、建立GreenPlum資料庫的引數檔案(僅Master節點)
在$GPHOME/docs目錄下,存在一些引數檔案的模版,可以通過這些模版快速配置一些常用的引數檔案。比如GreenPlum資料庫的引數檔案可以參考$GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config檔案。
[gpadmin@mdw ~]$ cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config /gpdb/app/config/gpinitsystem_config
配置引數檔案gpinitsystem_config
[gpadmin@mdw config]$ cat 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=(/data/gpdata/primary) #### OS-configured hostname or IP address of the master host. MASTER_HOSTNAME=mdw #### File system location where the master data directory #### will be created. MASTER_DIRECTORY=/data/gpdata/master #### Port number for the master instance. MASTER_PORT=5432 #### 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=(/data/gpdata/mirror) ################################################ #### OTHER OPTIONAL PARAMETERS ################################################ #### Create a database of this name after initialization. #DATABASE_NAME=name_of_database #### 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
7.5、GreenPlum資料庫初始化(僅Master節點)
接下來就可以使用gpinitsystem工具初始化資料庫了,一些引數檔案中沒有設定的重要引數,在初始化資料庫時會被使用預設值,可以在初始化之後根據需求及主機的配置進行設定。GreenPlum資料庫的引數也分為靜態引數和動態引數,靜態引數需重啟資料庫才能生效,動態引數不需要重啟資料庫即可生效。
若需要standby master;可以-s 主機名即可;也可以後續使用gpinitsystem新增。這個後續文章講解
[gpadmin@mdw config]$ gpinitsystem -c gpinitsystem_config -h seg_host 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, please wait... 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Reading Greenplum configuration file gpinitsystem_config 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Locale has not been set in gpinitsystem_config, will set to default value 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Locale set to en_US.utf8 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-No DATABASE_NAME set, will exit following template1 updates 20180329:18:18:42:001126 gpinitsystem:mdw:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250 20180329:18:18:43:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checking configuration parameters, Completed 20180329:18:18:43:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing multi-home checks, please wait... .. 20180329:18:18:44:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Configuring build for standard array 20180329:18:18:44:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing multi-home checks, Completed 20180329:18:18:44:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Building primary segment instance array, please wait... .. 20180329:18:18:45:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checking Master host 20180329:18:18:45:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checking new segment hosts, please wait... .20180329:18:18:50:001126 gpinitsystem:mdw:gpadmin-[WARN]:----------------------------------------------------------- 20180329:18:18:50:001126 gpinitsystem:mdw:gpadmin-[WARN]:-Host sdw1 is assigned as localhost in /etc/hosts 20180329:18:18:50:001126 gpinitsystem:mdw:gpadmin-[WARN]:-This will cause segment->master communication failures 20180329:18:18:50:001126 gpinitsystem:mdw:gpadmin-[WARN]:-Remove sdw1 from local host line in /etc/hosts 20180329:18:18:50:001126 gpinitsystem:mdw:gpadmin-[WARN]:----------------------------------------------------------- .20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[WARN]:----------------------------------------------------------- 20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[WARN]:-Host sdw2 is assigned as localhost in /etc/hosts 20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[WARN]:-This will cause segment->master communication failures 20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[WARN]:-Remove sdw2 from local host line in /etc/hosts 20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[WARN]:----------------------------------------------------------- 20180329:18:18:51:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checking new segment hosts, Completed 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Database Creation Parameters 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:--------------------------------------- 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master Configuration 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:--------------------------------------- 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master instance name = EMC Greenplum DW 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master hostname = mdw 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master port = 5432 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master instance dir = /data/gpdata/master/gpseg-1 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master LOCALE = en_US.utf8 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum segment prefix = gpseg 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master Database = 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master connections = 250 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master buffers = 128000kB 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Segment connections = 750 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Segment buffers = 128000kB 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Checkpoint segments = 8 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Encoding = UNICODE 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Postgres param file = Off 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Initdb to be used = /gpdb/greenplum-db/./bin/initdb 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-GP_LIBRARY_PATH is = /gpdb/greenplum-db/./lib 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Ulimit check = Passed 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Array host connect type = Single hostname per node 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [1] = ::1 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [2] = 192.168.1.201 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Master IP address [3] = fe80::20c:29ff:fe30:f99e 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Standby Master = Not Configured 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Primary segment # = 1 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Total Database segments = 2 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Trusted shell = ssh 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Number segment hosts = 2 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Mirroring config = OFF 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:---------------------------------------- 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Primary Segment Configuration 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:---------------------------------------- 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-sdw1 /data/gpdata/primary/gpseg0 40000 2 0 20180329:18:18:52:001126 gpinitsystem:mdw:gpadmin-[INFO]:-sdw2 /data/gpdata/primary/gpseg1 40000 3 1 Continue with Greenplum creation Yy/Nn> y 20180329:18:19:05:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Building the Master instance database, please wait... 20180329:18:19:19:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Starting the Master in admin mode 20180329:18:19:25:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Commencing parallel build of primary segment instances 20180329:18:19:25:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Spawning parallel processes batch [1], please wait... .. 20180329:18:19:25:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait... ............................. 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------ 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Parallel process exit status 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------ 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as completed = 2 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as killed = 0 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Total processes marked as failed = 0 20180329:18:19:54:001126 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------ 20180329:18:19:55:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Deleting distributed backout files 20180329:18:19:55:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Removing back out file 20180329:18:19:55:001126 gpinitsystem:mdw:gpadmin-[INFO]:-No errors generated from parallel processes 20180329:18:19:55:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Starting gpstop with args: -a -i -m -d /data/gpdata/master/gpseg-1 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Obtaining Segment details from master... 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.8.1 build 1' 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-There are 0 connections to the database 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate' 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Master host=mdw 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate 20180329:18:19:55:011745 gpstop:mdw:gpadmin-[INFO]:-Master segment instance directory=/data/gpdata/master/gpseg-1 20180329:18:19:56:011745 gpstop:mdw:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process 20180329:18:19:56:011745 gpstop:mdw:gpadmin-[INFO]:-Terminating processes for segment /data/gpdata/master/gpseg-1 20180329:18:19:57:011832 gpstart:mdw:gpadmin-[INFO]:-Starting gpstart with args: -a -d /data/gpdata/master/gpseg-1 20180329:18:19:57:011832 gpstart:mdw:gpadmin-[INFO]:-Gathering information and validating the environment... 20180329:18:19:57:011832 gpstart:mdw:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.8.1 build 1' 20180329:18:19:57:011832 gpstart:mdw:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150' 20180329:18:19:57:011832 gpstart:mdw:gpadmin-[INFO]:-Starting Master instance in admin mode 20180329:18:19:58:011832 gpstart:mdw:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information 20180329:18:19:58:011832 gpstart:mdw:gpadmin-[INFO]:-Obtaining Segment details from master... 20180329:18:19:58:011832 gpstart:mdw:gpadmin-[INFO]:-Setting new master era 20180329:18:19:58:011832 gpstart:mdw:gpadmin-[INFO]:-Master Started... 20180329:18:19:58:011832 gpstart:mdw:gpadmin-[INFO]:-Shutting down master 20180329:18:19:59:011832 gpstart:mdw:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait... .... 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:-Process results... 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:----------------------------------------------------- 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:- Successful segment starts = 2 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:- Failed segment starts = 0 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:----------------------------------------------------- 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:- 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:----------------------------------------------------- 20180329:18:20:03:011832 gpstart:mdw:gpadmin-[INFO]:-Starting Master instance mdw directory /data/gpdata/master/gpseg-1 20180329:18:20:04:011832 gpstart:mdw:gpadmin-[INFO]:-Command pg_ctl reports Master mdw instance active 20180329:18:20:04:011832 gpstart:mdw:gpadmin-[INFO]:-No standby master configured. skipping... 20180329:18:20:04:011832 gpstart:mdw:gpadmin-[INFO]:-Database successfully started 20180329:18:20:04:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode 20180329:18:20:04:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Loading gp_toolkit... 20180329:18:20:05:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Scanning utility log file for any warning messages 20180329:18:20:05:001126 gpinitsystem:mdw:gpadmin-[WARN]:-******************************************************* 20180329:18:20:05:001126 gpinitsystem:mdw:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[WARN]:-were generated during the array creation 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Please review contents of log file 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20180329.log 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-To determine level of criticality 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-These messages could be from a previous run of the utility 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-that was called today! 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[WARN]:-******************************************************* 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Greenplum Database instance successfully created 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------------- 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-To complete the environment configuration, please 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-update gpadmin .bashrc file with the following 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/data/gpdata/master/gpseg-1" 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:- to access the Greenplum scripts for this instance: 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:- or, use -d /data/gpdata/master/gpseg-1 option for the Greenplum scripts 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:- Example gpstate -d /data/gpdata/master/gpseg-1 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20180329.log 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Review options for gpinitstandby 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:------------------------------------------------------- 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-The Master /data/gpdata/master/gpseg-1/pg_hba.conf post gpinitsystem 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-has been configured to allow all hosts within this new 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-new array must be explicitly added to this file 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-located in the /gpdb/greenplum-db/./docs directory 20180329:18:20:06:001126 gpinitsystem:mdw:gpadmin-[INFO]:-------------------------------------------------------