Greenplum recover failed segment
来源:互联网 发布:软件开源是什么意思 编辑:程序博客网 时间:2024/04/29 21:08
在做segment恢复之前,先看下如何检查segment状态:
通过命令查看:
gpstate -e
20170329:09:43:16:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Starting gpstate with args: -e
20170329:09:43:16:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:09:43:16:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:09:43:16:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:09:43:17:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Gathering data from segments...
.
20170329:09:43:18:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-----------------------------------------------------
20170329:09:43:18:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Segment Mirroring Status Report
20170329:09:43:18:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-----------------------------------------------------
20170329:09:43:18:019934 gpstate:db-192-168-101-115:gpadmin-[INFO]:-All segments are running normally
通过数据字典查看
psql -d postgres -c "SELECT * FROM gp_segment_configuration WHERE status='d';"
status字段 d=down u=up
mode = s, c, r s=synced, c=change logging, r=resyning。
已同步,说明节点现在是mirror状态,并且已经完成同步。
跟踪块变更,说明节点现在是primary状态,正在产生块变更日志。
同步中,说明节点现在是mirror状态,并且还没有同步完成。
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port | san_mounts
------+---------+------+----------------+------+--------+------+----------+---------+------------------+------------
(0 rows)
gpstate -m
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Starting gpstate with args: -m
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Current GPDB mirror list and status
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Type = Spread
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:- Mirror Datadir Port Status Data Status
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-225 /data01/gpadmin/gpdata/mirror/gpseg0 50000 Passive Synchronized
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-217 /data01/gpadmin/gpdata/mirror/gpseg1 50000 Passive Synchronized
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-34 /data01/gpadmin/gpdata/mirror/gpseg2 50000 Passive Synchronized
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-142 /data01/gpadmin/gpdata/mirror/gpseg3 50000 Passive Synchronized
20170329:09:45:48:020121 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
查看日志:
在主节点检查warning,error,fatal,panic日志级别的信息
gplogfilter -t
在每一个segment检查warning,error,fatal,panic日志级别的信息
cat seg_hosts
db-192-168-100-217
db-192-168-100-225
db-192-168-100-34
db-192-168-100-142
gpssh -f seg_hosts -e 'source /usr/local/greenplum-db/greenplum_path.sh;gplogfilter -t /data01/gpadmin/gpdata/primary/*/pg_log/gpdb*.csv' > seglog.out
下面模拟故障进行恢复
步骤:
1.模拟故障
2.通过命令和数据字典确认segment故障
3.重启集群
4.进行恢复
5.检查恢复情况
6.角色调换,恢复完成
segment:
db-192-168-100-217
pg_ctl stop -D /data01/gpadmin/gpdata/primary/gpseg0/ //模拟故障
master节点查看故障节点:
SELECT * FROM gp_segment_configuration WHERE status='d';
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port | san_mounts
------+---------+------+----------------+------+--------+-------+---------------------------------+--------------------+------------------+-----------
-
2 | 0 | m | p | s | d | 40000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 41000 |
由于做了mirror,down已个节点不影响Greenplum使用
gpstate -m
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Starting gpstate with args: -m
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Current GPDB mirror list and status
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Type = Spread
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:- Mirror Datadir Port Status Data Status
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-225 /data01/gpadmin/gpdata/mirror/gpseg0 50000 Acting as Primary Change Tracking
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-217 /data01/gpadmin/gpdata/mirror/gpseg1 50000 Passive Synchronized
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-34 /data01/gpadmin/gpdata/mirror/gpseg2 50000 Passive Synchronized
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-142 /data01/gpadmin/gpdata/mirror/gpseg3 50000 Passive Synchronized
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[WARNING]:-1 segment(s) configured as mirror(s) are acting as primaries
20170329:11:22:25:024064 gpstate:db-192-168-101-115:gpadmin-[WARNING]:-1 mirror segment(s) acting as primaries are in change trackin
重启集群
gpstop -r //提示有一个segment down
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-----------------------------------------------------
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:- Segments stopped successfully = 8
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:- Segments with errors during stop = 0
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[WARNING]:-Segments that are currently marked down in configuration = 1 <<<<<<<<
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:- (stop was still attempted on these segments)
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-----------------------------------------------------
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Successfully shutdown 8 of 8 segment instances
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Database successfully shutdown with no errors reported
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Cleaning up leftover gpmmon process
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-No leftover gpmmon process found
20170329:11:29:15:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Cleaning up leftover gpsmon processes
20170329:11:29:16:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-No leftover gpsmon processes on some hosts. not attempting forceful termination on these hosts
20170329:11:29:16:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Cleaning up leftover shared memory
20170329:11:29:21:024298 gpstop:db-192-168-101-115:gpadmin-[INFO]:-Restarting System...
进行recover
这里直接gprecoveseg = gprecoverseg -o ./recov(生成配置文件) + gprecoverseg -i ./recov(读取配置文件进行恢复)
gprecoverseg
20170329:11:32:44:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Starting gprecoverseg with args:
20170329:11:32:44:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:11:32:44:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:11:32:44:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Checking if segments are ready to connect
20170329:11:32:44:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:11:32:45:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Greenplum instance recovery parameters
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:----------------------------------------------------------
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Recovery type = Standard
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:----------------------------------------------------------
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Recovery 1 of 1
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:----------------------------------------------------------
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Synchronization mode = Incremental
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance host = db-192-168-100-217.sky-mobi.com
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance address = db-192-168-100-217
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance directory = /data01/gpadmin/gpdata/primary/gpseg0
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance port = 40000
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance replication port = 41000
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Failed instance hank directory = /data01/gpadmin/gpdata/primary_hank/gpseg0
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance host = db-192-168-100-225.sky-mobi.com
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance address = db-192-168-100-225
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance directory = /data01/gpadmin/gpdata/mirror/gpseg0
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance port = 50000
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance replication port = 51000
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Source instance hank directory = /data01/gpadmin/gpdata/mirror_hank/gpseg0
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:- Recovery Target = in-place
20170329:11:32:46:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:----------------------------------------------------------
Continue with segment recovery procedure Yy|Nn (default=N):
> y
20170329:11:32:57:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-1 segment(s) to recover
20170329:11:32:57:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Ensuring 1 failed segment(s) are stopped
20170329:11:32:58:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Ensuring that shared memory is cleaned up for stopped segments
updating flat files
20170329:11:33:03:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Updating configuration with new mirrors
20170329:11:33:03:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Updating mirrors
.
20170329:11:33:04:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Starting mirrors
20170329:11:33:04:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Commencing parallel primary and mirror segment instance startup, please wait...
..
20170329:11:33:06:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Process results...
20170329:11:33:06:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Updating configuration to mark mirrors up
20170329:11:33:07:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Updating primaries
20170329:11:33:07:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Commencing parallel primary conversion of 1 segments, please wait...
.
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Process results...
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Done updating primaries
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-******************************************************************
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Updating segments for resynchronization is completed.
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-For segments updated successfully, resynchronization will continue in the background.
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-Use gpstate -s to check the resynchronization progress.
20170329:11:33:08:024744 gprecoverseg:db-192-168-101-115:gpadmin-[INFO]:-******************************************************************
连接集群检查状态:
这里看到角色优先级互换了
select * from gp_segment_configuration; dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port
| san_mounts
------+---------+------+----------------+------+--------+-------+---------------------------------+---------------------------------+-----------------
-+------------
2 | 0 | m | p | s | u | 40000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 41000
|
5 | 1 | m | m | s | u | 50000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 51000
|
9 | 3 | m | m | s | u | 50000 | db-192-168-100-142 | db-192-168-100-142 | 51000
|
10 | 2 | m | m | s | u | 50000 | db-192-168-100-34 | db-192-168-100-34 | 51000
|
11 | -1 | m | m | s | u | 1922 | db-192-168-101-116 | db-192-168-101-116 |
|
1 | -1 | p | p | s | u | 1922 | db-192-168-101-115.sky-mobi.com | db-192-168-101-115.sky-mobi.com |
|
3 | 1 | p | p | s | u | 40000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 41000
|
4 | 0 | p | m | s | u | 50000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 51000
|
7 | 2 | p | p | s | u | 40000 | db-192-168-100-142 | db-192-168-100-142 | 41000
|
8 | 3 | p | p | s | u | 40000 | db-192-168-100-34 | db-192-168-100-34 | 41000
|
gpstate -m
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Starting gpstate with args: -m
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Current GPDB mirror list and status
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Type = Spread
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:- Mirror Datadir Port Status Data Status
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-225 /data01/gpadmin/gpdata/mirror/gpseg0 50000 Passive Resynchronizing
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-217 /data01/gpadmin/gpdata/mirror/gpseg1 50000 Passive Synchronized
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-34 /data01/gpadmin/gpdata/mirror/gpseg2 50000 Passive Synchronized
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-142 /data01/gpadmin/gpdata/mirror/gpseg3 50000 Passive Synchronized
20170329:11:38:52:025543 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
进行角色调换:
gprecoverseg -r
跟踪检查状态,这里正在进行同步
select * from gp_segment_configuration order by role,dbid;
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port
| san_mounts
------+---------+------+----------------+------+--------+-------+---------------------------------+---------------------------------+-----------------
-+------------
4 | 0 | m | m | r | u | 50000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 51000
|
5 | 1 | m | m | s | u | 50000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 51000
|
9 | 3 | m | m | s | u | 50000 | db-192-168-100-142 | db-192-168-100-142 | 51000
|
10 | 2 | m | m | s | u | 50000 | db-192-168-100-34 | db-192-168-100-34 | 51000
|
11 | -1 | m | m | s | u | 1922 | db-192-168-101-116 | db-192-168-101-116 |
|
1 | -1 | p | p | s | u | 1922 | db-192-168-101-115.sky-mobi.com | db-192-168-101-115.sky-mobi.com |
|
2 | 0 | p | p | r | u | 40000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 41000
|
3 | 1 | p | p | s | u | 40000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 41000
|
7 | 2 | p | p | s | u | 40000 | db-192-168-100-142 | db-192-168-100-142 | 41000
|
8 | 3 | p | p | s | u | 40000 | db-192-168-100-34 | db-192-168-100-34 | 41000
|
(10 rows)
过段时间再次查看:
gpstate -m
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Starting gpstate with args: -m
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.12.0 build 1'
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.2.15 (Greenplum Database 4.3.12.0 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 27 2017 20:45:12'
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:-Obtaining Segment details from master...
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Current GPDB mirror list and status
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:--Type = Spread
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:- Mirror Datadir Port Status Data Status
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-225 /data01/gpadmin/gpdata/mirror/gpseg0 50000 Passive Synchronized
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-217 /data01/gpadmin/gpdata/mirror/gpseg1 50000 Passive Synchronized
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-34 /data01/gpadmin/gpdata/mirror/gpseg2 50000 Passive Synchronized
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:- db-192-168-100-142 /data01/gpadmin/gpdata/mirror/gpseg3 50000 Passive Synchronized
20170329:11:39:41:025617 gpstate:db-192-168-101-115:gpadmin-[INFO]:--------------------------------------------------------------
select * from gp_segment_configuration;
dbid | content | role | preferred_role | mode | status | port | hostname | address | replication_port
| san_mounts
------+---------+------+----------------+------+--------+-------+---------------------------------+---------------------------------+-----------------
-+------------
3 | 1 | p | p | s | u | 40000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 41000
|
5 | 1 | m | m | s | u | 50000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 51000
|
7 | 2 | p | p | s | u | 40000 | db-192-168-100-142 | db-192-168-100-142 | 41000
|
10 | 2 | m | m | s | u | 50000 | db-192-168-100-34 | db-192-168-100-34 | 51000
|
8 | 3 | p | p | s | u | 40000 | db-192-168-100-34 | db-192-168-100-34 | 41000
|
9 | 3 | m | m | s | u | 50000 | db-192-168-100-142 | db-192-168-100-142 | 51000
|
1 | -1 | p | p | s | u | 1922 | db-192-168-101-115.sky-mobi.com | db-192-168-101-115.sky-mobi.com |
|
11 | -1 | m | m | s | u | 1922 | db-192-168-101-116 | db-192-168-101-116 |
|
2 | 0 | p | p | s | u | 40000 | db-192-168-100-217.sky-mobi.com | db-192-168-100-217 | 41000
|
4 | 0 | m | m | s | u | 50000 | db-192-168-100-225.sky-mobi.com | db-192-168-100-225 | 51000
|
(10 rows)
同步已完成,至此恢复完成
0 0
- Greenplum recover failed segment
- 监控GreenPlum Segment磁盘空间
- Greenplum添加segment节点
- Greenplum删除segment节点
- greenplum segment down 实例
- Greenplum 扩展 segment个数
- Greenplum segment 锁处理
- greenplum segment恢复的过程
- 从GREENPLUM集群中去除某个SEGMENT
- Greenplum Database Installation Segment on RHEL 5
- greenplum恢复失败的segment的方法
- Greenplum segment级锁问题排查方法
- SMON: recover undo segment 与 事务恢复(by eygle)
- 问题分享:Greenplum Compression failed: insufficient memory
- Greenplum
- greenplum
- greenplum
- GreenPlum
- Vector源码阅读(JDK 8)
- TCP/IP协议族——IPV4地址
- 栈 stack
- Ionic2 NavController模块的生命周期事件
- 比大小
- Greenplum recover failed segment
- 梯度下降和随机梯度下降
- centos使用jmap进行jvm分析报错
- 计算机体系结构》是驱动开发的基础
- 解决NDK编译cpp文件出现的-Werror=format-security
- poj 3414 bfs+记录路劲
- 混合APP开发的套路(二):加载项目中的html
- 【综合知识】系分综合知识总结
- dev c++ opengl的配置