3 Star 0 Fork 0

mirrors_vmware-archive/gpresize

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-2-Clause
***********************************************************************************
** Repo is no longer maintained. **
***********************************************************************************

readme for gpresize

**************************************************************************************************
** gpresize
**************************************************************************************************
WARNING!  
These scripts can be destructive and are intended for evaluation purposes only!  Some commands 
used by these scripts are not supported by Pivotal.  These steps are intended to evaluate a 
cluster with more segments per host than was originally configured.  The scripts also allow you 
to restore the cluster to the original size.

Please do not use these scripts on a Production cluster.  Use only for Proof of Concept work and
data that is easily restored from an external backup.

These scripts also only work for a single database in a Greenplum cluster.

***************************************************************************************************
** Install 
***************************************************************************************************
Download update_repo.sh from github.
curl "https://raw.githubusercontent.com/pivotalguru/gpresize/master/update_repo.sh " > update_repo.sh
chmod 755 update_repo.sh
./update_repo.sh

Steps:
1.  Use gpstate to make sure the database is up and healthy.  Do NOT proceed if you have any 
segments that are down!

2.  Removing database mirroring if enabled with remove_mirroring.sh
Note: use gpstate to ensure you don't have any segments that are down.  If you have any segments 
down and you remove mirroring, the database will not work.

Example:
./remove_mirroring.sh

3.  Run a gpcrondump backup of the entire database.  This must be done AFTER step 1.

Example (where gpadmin is the name of the database):
gpcrondump -x gpadmin -a -c -g -G -C

4.  Run expand.sh and pass the number of parallel processes you want to use.
    - Pick a new System Expansion.
    - Enter a blank line for the new hosts you want to add.
    - Enter number of new segments PER HOST you want to add.  
    - Provide directory names such as "/data1/primary" and "/data2/primary".
    - Review the expand file and continue.
    - Expansion will execute and so will an analyze.

Example:
./expand.sh 8

5.  Test with the increased number of segments per host.  WARNING: If you decide to revert to the 
former configuration, any changes you make in this database will be lost!!

6.  (Optional) Run shrink.sh and pass the expansion file created during the expand process, the 
original database intialization file, and the number of parallel processes you want to use.  You 
only need to run this if you decide to revert to the former configuration.  

Note: You will need to update the gp_init_config file to remove the mirroring information.  
Mirroring will be added back in a later step.

Example:
./shrink.sh gpexpand_inputfile_20161012_174056 gp_init_config 8

7.  Add mirrors back to the configuration ONLY after you have decided to stay with the current 
number of segments per host or you have successfully executed shrink.sh to revert to the former 
configuration.  Run add_mirrors.sh to add mirrors back to the database.  Pass in the name the
standby master if you have one configured.  

Example:
./add_mirrors.sh smdw
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

暂无描述 展开 收起
Shell
BSD-2-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_vmware-archive/gpresize.git
git@gitee.com:mirrors_vmware-archive/gpresize.git
mirrors_vmware-archive
gpresize
gpresize
master

搜索帮助