gpstop
1 |
[gpadmin@gpmaster ~]$ gpstop --help |
常用的参数如下:
-a,不需要输入Y确认是否关闭,将直接关闭数据库。
-m,只关闭Master节点。
-r,重启数据库。
-u,加载参数文件,使修改的参数生效。
-M,设置关闭数据库的级别,有三种级别,fast、immediate和smart,gpstop –M fast,所有连接将中断并且回滚。gpstop –M immediate,强制关闭数据库,这种方式是不一致的关闭模式,不建议使用。Immediate smart,这是默认的关闭级别,所有连接的会话会收到关闭警告,不允许新链接访问数据库。
下面是默认级别关闭GreenPlum数据库的相关信息。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
[gpadmin@gpmaster ~]$ gpstop -a [INFO]:-Starting gpstop with args: -a [INFO]:-Gathering information and validating the environment... [INFO]:-Obtaining Greenplum Master catalog information [INFO]:-Obtaining Segment details from master... [INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.11.1 build commit: 9fad76371cc5554375f0c32ae46571eccf41c75b' [INFO]:-There are 0 connections to the database [INFO]:-Commencing Master instance shutdown with mode='smart' [INFO]:-Master host=gpmaster [INFO]:-Commencing Master instance shutdown with mode=smart [INFO]:-Master segment instance directory=/data/greenplum/master/gpseg-1 [INFO]:-Failed to shutdown master with pg_ctl. [INFO]:-Sending SIGQUIT signal... [INFO]:-Attempting forceful termination of any leftover master process [INFO]:-Terminating processes for segment /data/greenplum/master/gpseg-1 [INFO]:-Stopping master standby host gpstandby mode=fast [INFO]:-Successfully shutdown standby process on gpstandby [INFO]:-Commencing parallel primary segment instance shutdown, please wait... [INFO]:-0.00% of jobs completed [INFO]:-100.00% of jobs completed [INFO]:-Commencing parallel mirror segment instance shutdown, please wait... [INFO]:-0.00% of jobs completed [INFO]:-100.00% of jobs completed [INFO]:----------------------------------------------------- [INFO]:- Segments stopped successfully = 18 [INFO]:- Segments with errors during stop = 0 [INFO]:----------------------------------------------------- [INFO]:-Successfully shutdown 18 of 18 segment instances [INFO]:-Database successfully shutdown with no errors reported [INFO]:-Cleaning up leftover gpmmon process [INFO]:-No leftover gpmmon process found [INFO]:-Cleaning up leftover gpsmon processes [INFO]:-No leftover gpsmon processes on some hosts. not attempting forceful termination on these hosts [INFO]:-Cleaning up leftover shared memory |
gpstate
1 |
[gpadmin@gpmaster ~]$ gpstate --help |
常用的参数如下:
-s,详细信息。
-m,Mirror信息。
-f,Master的Standby信息。
-e,Segment的Mirror信息。
-i,版本信息。
gpstart
1 |
[gpadmin@gpmaster ~]$ gpstart --help |
常用的启动参数有以下几个参数:
-a,该模式不需要在启动过程中输入Y进行确认,将直接启动数据库。
-m,只启动Master节点,不启动Segment节点,通常在维护的时候使用。
-y,只启动Master的primary节点,不启动standby节点。
如下为GreenPlum数据库的启动过程。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[INFO]:-Starting gpstart with args: -a [INFO]:-Gathering information and validating the environment... [INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.11.1 build commit: 9fad76371cc5554375f0c32ae46571eccf41c75b' [INFO]:-Greenplum Catalog Version: '201310150' [INFO]:-Starting Master instance in admin mode [INFO]:-Obtaining Greenplum Master catalog information [INFO]:-Obtaining Segment details from master... [INFO]:-Setting new master era [INFO]:-Master Started... [INFO]:-Shutting down master [INFO]:-Commencing parallel primary and mirror segment instance startup, please wait... [INFO]:-Process results... [INFO]:----------------------------------------------------- [INFO]:- Successful segment starts = 18 [INFO]:- Failed segment starts = 0 [INFO]:- Skipped segment starts (segments are marked down in configuration) = 0 [INFO]:----------------------------------------------------- [INFO]:- [INFO]:-Successfully started 18 of 18 segment instances [INFO]:----------------------------------------------------- [INFO]:-Starting Master instance gpmaster directory /data/greenplum/master/gpseg-1 [INFO]:-Command pg_ctl reports Master gpmaster instance active [INFO]:-Starting standby master [INFO]:-Checking if standby master is running on host: gpstandby in directory: /data/greenplum/master/gpseg-1 [INFO]:-Database successfully started |
完结。。。