[gpadmin@gp01 gpdata]$ cat /gpdata/greenplum-db/cfg/scp_key
gp01
gp02
gp03
[gpadmin@gp01 gpdata]$ tar -jcvf greenplum-db-4.2.3.1.tar.bz2 greenplum-db-4.2.3.1
[gpadmin@gp01 gpdata]$ gpscp -f /gpdata/greenplum-db-4.2.3.1/cfg/scp_key greenplum-db-4.2.3.1.tar.bz2 =:/gpdata
[gpadmin@gp01 gpdata]$ gpssh -f /gpdata/greenplum-db/cfg/init_hostname
=> tar --directory /gpdata -jxvf /gpdata/greenplum-db-4.2.3.1.tar.bz2
[gpadmin@gp01 cfg]$ cat init_config
ARRAY_NAME="GreenPlum Database"
MACHINE_LIST_FILE=/gpdata/greenplum-db/cfg/init_hostname
SEG_PREFIX=gp
PORT_BASE=50000
declare -e DATA_DIRECTORY=(/database/gp_seg)
MASTER_HOSTNAME=gp01
MASTER_DIRECTORY=/database/gp_master
MASTER_PORT=1527
TRUSTED_SHELL=ssh
CHECK_POINT_SEGMENTS=64
ENCODING=UNICODE
[gpadmin@gp01 cfg]$ gpinitsystem -c /gpdata/greenplum-db/cfg/init_config
20130917:15:03:04:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checking configuration parameters, please wait...
20130917:15:03:04:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Reading Greenplum configuration file /gpdata/greenplum-db/cfg/init_config
/gpdata/greenplum-db/cfg/init_config: line 5: declare: -e: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
20130917:15:03:04:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Locale has not been set in /gpdata/greenplum-db/cfg/init_config, will set to default value
20130917:15:03:05:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Locale set to en_US.utf8
20130917:15:03:05:026310 gpinitsystem:gp01:gpadmin-[INFO]:-No DATABASE_NAME set, will exit following template1 updates
20130917:15:03:05:026310 gpinitsystem:gp01:gpadmin-[INFO]:-MASTER_MAX_CONNECT not set, will set to default value 250
20130917:15:03:05:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checking configuration parameters, Completed
20130917:15:03:05:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Commencing multi-home checks, please wait...
..
/gpdata/greenplum-db/cfg/init_config: line 5: declare: -e: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
20130917:15:03:06:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Configuring build for standard array
20130917:15:03:06:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Commencing multi-home checks, Completed
20130917:15:03:06:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Building primary segment instance array, please wait...
/gpdata/greenplum-db/cfg/init_config: line 5: declare: -e: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
..
20130917:15:03:06:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checking Master host
20130917:15:03:06:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checking new segment hosts, please wait...
..
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checking new segment hosts, Completed
/gpdata/greenplum-db/cfg/init_config: line 5: declare: -e: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Greenplum Database Creation Parameters
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:---------------------------------------
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master Configuration
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:---------------------------------------
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master instance name = GreenPlum Database
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master hostname = gp01
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master port = 1527
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master instance dir = /database/gp_master/gp-1
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master LOCALE = en_US.utf8
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Greenplum segment prefix = gp
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master Database =
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master connections = 250
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master buffers = 128000kB
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Segment connections = 750
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Segment buffers = 128000kB
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Checkpoint segments = 64
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Encoding = UNICODE
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Postgres param file = Off
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Initdb to be used = /gpdata/greenplum-db-4.2.3.1/bin/initdb
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-GP_LIBRARY_PATH is = /gpdata/greenplum-db-4.2.3.1/lib
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Ulimit check = Passed
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Array host connect type = Single hostname per node
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Master IP address [1] = 192.168.1.21
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Standby Master = Not Configured
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Primary segment # = 1
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Total Database segments = 2
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Trusted shell = ssh
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Number segment hosts = 2
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Mirroring config = OFF
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:----------------------------------------
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Greenplum Primary Segment Configuration
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:----------------------------------------
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-gp02 /database/gp_seg/gp0 50000 2 0
20130917:15:03:10:026310 gpinitsystem:gp01:gpadmin-[INFO]:-gp03 /database/gp_seg/gp1 50000 3 1
Continue with Greenplum creation Yy/Nn>
y
20130917:15:08:12:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Building the Master instance database, please wait...
20130917:15:08:20:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Starting the Master in admin mode
20130917:15:08:24:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Commencing parallel build of primary segment instances
20130917:15:08:25:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Spawning parallel processes batch [1], please wait...
..
20130917:15:08:25:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Waiting for parallel processes batch [1], please wait...
..................
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:------------------------------------------------
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Parallel process exit status
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:------------------------------------------------
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Total processes marked as completed = 2
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Total processes marked as killed = 0
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Total processes marked as failed = 0
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:------------------------------------------------
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Deleting distributed backout files
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Removing back out file
20130917:15:08:43:026310 gpinitsystem:gp01:gpadmin-[INFO]:-No errors generated from parallel processes
20130917:15:08:44:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Restarting the Greenplum instance in production mode
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Starting gpstop with args: -a -i -m -d /database/gp_master/gp-1
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Gathering information and validating the environment...
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Obtaining Segment details from master...
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.2.3.1 build 2'
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-There are 0 connections to the database
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='immediate'
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Master host=gp01
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=immediate
20130917:15:08:44:004103 gpstop:gp01:gpadmin-[INFO]:-Master segment instance directory=/database/gp_master/gp-1
20130917:15:08:44:004186 gpstart:gp01:gpadmin-[INFO]:-Starting gpstart with args: -a -d /database/gp_master/gp-1
20130917:15:08:44:004186 gpstart:gp01:gpadmin-[INFO]:-Gathering information and validating the environment...
20130917:15:08:44:004186 gpstart:gp01:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.2.3.1 build 2'
20130917:15:08:44:004186 gpstart:gp01:gpadmin-[INFO]:-Greenplum Catalog Version: '201109210'
20130917:15:08:44:004186 gpstart:gp01:gpadmin-[INFO]:-Starting Master instance in admin mode
20130917:15:08:45:004186 gpstart:gp01:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20130917:15:08:45:004186 gpstart:gp01:gpadmin-[INFO]:-Obtaining Segment details from master...
20130917:15:08:45:004186 gpstart:gp01:gpadmin-[INFO]:-Setting new master era
20130917:15:08:45:004186 gpstart:gp01:gpadmin-[INFO]:-Master Started...
20130917:15:08:45:004186 gpstart:gp01:gpadmin-[INFO]:-Shutting down master
20130917:15:08:47:004186 gpstart:gp01:gpadmin-[INFO]:-No standby master configured. skipping...
20130917:15:08:47:004186 gpstart:gp01:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
...
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-Process results...
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-----------------------------------------------------
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:- Successful segment starts = 2
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:- Failed segment starts = 0
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:- Skipped segment starts (segments are marked down in configuration) = 0
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-----------------------------------------------------
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-----------------------------------------------------
20130917:15:08:50:004186 gpstart:gp01:gpadmin-[INFO]:-Starting Master instance gp01 directory /database/gp_master/gp-1
20130917:15:08:51:004186 gpstart:gp01:gpadmin-[INFO]:-Command pg_ctl reports Master gp01 instance active
20130917:15:08:51:004186 gpstart:gp01:gpadmin-[INFO]:-Database successfully started
20130917:15:08:51:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Completed restart of Greenplum instance in production mode
20130917:15:08:51:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Loading gp_toolkit...
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Scanning utility log file for any warning messages
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[WARN]:-*******************************************************
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[WARN]:-Scan of log file indicates that some warnings or errors
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[WARN]:-were generated during the array creation
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Please review contents of log file
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-/home/gpadmin/gpAdminLogs/gpinitsystem_20130917.log
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-To determine level of criticality
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[WARN]:-*******************************************************
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Greenplum Database instance successfully created
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-------------------------------------------------------
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-To complete the environment configuration, please
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-update gpadmin .bashrc file with the following
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-1. Ensure that the greenplum_path.sh file is sourced
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-2. Add "export MASTER_DATA_DIRECTORY=/database/gp_master/gp-1"
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:- to access the Greenplum scripts for this instance:
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:- or, use -d /database/gp_master/gp-1 option for the Greenplum scripts
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:- Example gpstate -d /database/gp_master/gp-1
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Script log file = /home/gpadmin/gpAdminLogs/gpinitsystem_20130917.log
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-To remove instance, run gpdeletesystem utility
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-To initialize a Standby Master Segment for this Greenplum instance
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Review options for gpinitstandby
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-------------------------------------------------------
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-The Master /database/gp_master/gp-1/pg_hba.conf post gpinitsystem
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-has been configured to allow all hosts within this new
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-array to intercommunicate. Any hosts external to this
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-new array must be explicitly added to this file
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-Refer to the Greenplum Admin support guide which is
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-located in the /gpdata/greenplum-db-4.2.3.1/docs directory
20130917:15:08:52:026310 gpinitsystem:gp01:gpadmin-[INFO]:-------------------------------------------------------
[gpadmin@gp01 gp-1]$ psql postgres gpadmin
psql (8.2.15)
Type "help" for help.
postgres=# alter user gpadmin ENCRYPTED PASSWORD 'gpadminpwd';
ALTER ROLE
postgres=#
[gpadmin@gp01 gp-1]$ psql postgres gpadmin
psql (8.2.15)
Type "help" for help.
postgres=# create database test1 template=template0 encoding='UTF8';
CREATE DATABASE
postgres=# \l
List of databases
Name | Owner | Encoding | Access privileges
-----------+---------+----------+---------------------
postgres | gpadmin | UTF8 |
template0 | gpadmin | UTF8 | =c/gpadmin
: gpadmin=CTc/gpadmin
template1 | gpadmin | UTF8 | =c/gpadmin
: gpadmin=CTc/gpadmin
test1 | gpadmin | UTF8 |
(4 rows)
postgres=# \c test1 gpadmin
You are now connected to database "test1" as user "gpadmin".
test1=# \l+ test1
List of databases
Name | Owner | Encoding | Access privileges | Size | Tablespace | Description
-----------+---------+----------+---------------------+-------+------------+---------------------------
postgres | gpadmin | UTF8 | | 28 MB | pg_default |
template0 | gpadmin | UTF8 | =c/gpadmin | 27 MB | pg_default |
: gpadmin=CTc/gpadmin
template1 | gpadmin | UTF8 | =c/gpadmin | 28 MB | pg_default | Default template database
: gpadmin=CTc/gpadmin
test1 | gpadmin | UTF8 | | 27 MB | pg_default |
(4 rows)
test1=# create table t1(id int primary key,name varchar(100));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
CREATE TABLE
test1=# \dt
List of relations
Schema | Name | Type | Owner | Storage
--------+------+-------+---------+---------
public | t1 | table | gpadmin | heap
(1 row)
test1=# \dt t1
List of relations
Schema | Name | Type | Owner | Storage
--------+------+-------+---------+---------
public | t1 | table | gpadmin | heap
(1 row)
test1=# \d
List of relations
Schema | Name | Type | Owner | Storage
--------+------+-------+---------+---------
public | t1 | table | gpadmin | heap
(1 row)
test1=# \d t1
Table "public.t1"
Column | Type | Modifiers
--------+------------------------+-----------
id | integer | not null
name | character varying(100) |
Indexes:
"t1_pkey" PRIMARY KEY, btree (id)
Distributed by: (id)
test1=# \d+ t1
Table "public.t1"
Column | Type | Modifiers | Storage | Description
--------+------------------------+-----------+----------+-------------
id | integer | not null | plain |
name | character varying(100) | | extended |
Indexes:
"t1_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Distributed by: (id)
test1=#