blob: 4374555335bc3ebe10d4285020562edd23ee02ff [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Pegasus | Deployment</title>
<link rel="stylesheet" href="/zh/assets/css/app.css">
<link rel="shortcut icon" href="/zh/assets/images/favicon.ico">
<link rel="stylesheet" href="/zh/assets/css/utilities.min.css">
<link rel="stylesheet" href="/zh/assets/css/docsearch.v3.css">
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/all.min.js"></script>
<script src="/assets/js/docsearch.v3.js"></script>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Deployment | Pegasus</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Deployment" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="准备机器 Pegasus分布式集群至少需要准备这些机器: MetaServer:2~3台机器,无需SSD盘。 ReplicaServer:至少3台机器,建议挂SSD盘。譬如一台服务器挂着8块或者12块SSD盘。这些机器要求是同构的,即具有相同的配置。 Collector:可选角色,1台机器,无需SSD盘。该进程主要用于收集和汇总集群的统计信息,负载很小,建议放在MetaServer的其中一台机器上。" />
<meta property="og:description" content="准备机器 Pegasus分布式集群至少需要准备这些机器: MetaServer:2~3台机器,无需SSD盘。 ReplicaServer:至少3台机器,建议挂SSD盘。譬如一台服务器挂着8块或者12块SSD盘。这些机器要求是同构的,即具有相同的配置。 Collector:可选角色,1台机器,无需SSD盘。该进程主要用于收集和汇总集群的统计信息,负载很小,建议放在MetaServer的其中一台机器上。" />
<meta property="og:site_name" content="Pegasus" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2023-11-23T14:57:08+00:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Deployment" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","dateModified":"2023-11-23T14:57:08+00:00","datePublished":"2023-11-23T14:57:08+00:00","description":"准备机器 Pegasus分布式集群至少需要准备这些机器: MetaServer:2~3台机器,无需SSD盘。 ReplicaServer:至少3台机器,建议挂SSD盘。譬如一台服务器挂着8块或者12块SSD盘。这些机器要求是同构的,即具有相同的配置。 Collector:可选角色,1台机器,无需SSD盘。该进程主要用于收集和汇总集群的统计信息,负载很小,建议放在MetaServer的其中一台机器上。","headline":"Deployment","mainEntityOfPage":{"@type":"WebPage","@id":"/administration/deployment"},"url":"/administration/deployment"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<div class="dashboard is-full-height">
<!-- left panel -->
<div class="dashboard-panel is-medium is-hidden-mobile pl-0">
<div class="dashboard-panel-header has-text-centered">
<a href="/zh/">
<img src="/assets/images/pegasus-logo-inv.png" style="width: 80%;">
</a>
</div>
<div class="dashboard-panel-main is-scrollable pl-6">
<aside class="menu">
<p class="menu-label">Pegasus产品文档</p>
<ul class="menu-list">
<li>
<a href="/zh/docs/downloads"
class="">
下载
</a>
</li>
</ul>
<p class="menu-label">编译构建</p>
<ul class="menu-list">
<li>
<a href="/zh/docs/build/compile-by-docker"
class="">
使用Docker完成编译(推荐)
</a>
</li>
<li>
<a href="/zh/docs/build/compile-from-source"
class="">
从源码编译
</a>
</li>
</ul>
<p class="menu-label">客户端库</p>
<ul class="menu-list">
<li>
<a href="/zh/clients/java-client"
class="">
Java客户端
</a>
</li>
<li>
<a href="/zh/clients/cpp-client"
class="">
C++客户端
</a>
</li>
<li>
<a href="https://github.com/apache/incubator-pegasus/tree/master/go-client"
class="">
Golang客户端
</a>
</li>
<li>
<a href="/zh/clients/python-client"
class="">
Python客户端
</a>
</li>
<li>
<a href="/zh/clients/node-client"
class="">
NodeJS客户端
</a>
</li>
<li>
<a href="/zh/clients/scala-client"
class="">
Scala客户端
</a>
</li>
</ul>
<p class="menu-label">生态工具</p>
<ul class="menu-list">
<li>
<a href="/zh/docs/tools/shell"
class="">
Pegasus Shell 工具
</a>
</li>
<li>
<a href="https://github.com/pegasus-kv/admin-cli"
class="">
集群管理命令行
</a>
</li>
<li>
<a href="https://github.com/pegasus-kv/pegic"
class="">
数据访问命令行
</a>
</li>
</ul>
<p class="menu-label">用户接口</p>
<ul class="menu-list">
<li>
<a href="/zh/api/ttl"
class="">
TTL
</a>
</li>
<li>
<a href="/zh/api/single-atomic"
class="">
单行原子操作
</a>
</li>
<li>
<a href="/zh/api/redis"
class="">
Redis适配
</a>
</li>
<li>
<a href="/zh/api/geo"
class="">
GEO支持
</a>
</li>
<li>
<a href="/zh/api/http"
class="">
HTTP接口
</a>
</li>
</ul>
<p class="menu-label">高效运维</p>
<ul class="menu-list">
<li>
<a href="/zh/administration/deployment"
class="is-active">
集群部署
</a>
</li>
<li>
<a href="/zh/administration/config"
class="">
配置说明
</a>
</li>
<li>
<a href="/zh/administration/rebalance"
class="">
负载均衡
</a>
</li>
<li>
<a href="/zh/administration/monitoring"
class="">
可视化监控
</a>
</li>
<li>
<a href="/zh/administration/rolling-update"
class="">
集群升级
</a>
</li>
<li>
<a href="/zh/administration/scale-in-out"
class="">
集群扩容缩容
</a>
</li>
<li>
<a href="/zh/administration/resource-management"
class="">
资源管理
</a>
</li>
<li>
<a href="/zh/administration/cold-backup"
class="">
冷备份
</a>
</li>
<li>
<a href="/zh/administration/meta-recovery"
class="">
元数据恢复
</a>
</li>
<li>
<a href="/zh/administration/replica-recovery"
class="">
Replica数据恢复
</a>
</li>
<li>
<a href="/zh/administration/zk-migration"
class="">
Zookeeper迁移
</a>
</li>
<li>
<a href="/zh/administration/table-migration"
class="">
Table迁移
</a>
</li>
<li>
<a href="/zh/administration/table-soft-delete"
class="">
Table软删除
</a>
</li>
<li>
<a href="/zh/administration/table-env"
class="">
Table环境变量
</a>
</li>
<li>
<a href="/zh/administration/remote-commands"
class="">
远程命令
</a>
</li>
<li>
<a href="/zh/administration/partition-split"
class="">
Partition-Split
</a>
</li>
<li>
<a href="/zh/administration/duplication"
class="">
跨机房同步
</a>
</li>
<li>
<a href="/zh/administration/compression"
class="">
数据压缩
</a>
</li>
<li>
<a href="/zh/administration/throttling"
class="">
流量控制
</a>
</li>
<li>
<a href="/zh/administration/experiences"
class="">
运维经验
</a>
</li>
<li>
<a href="/zh/administration/manual-compact"
class="">
Manual Compact功能
</a>
</li>
<li>
<a href="/zh/administration/usage-scenario"
class="">
Usage Scenario功能
</a>
</li>
<li>
<a href="/zh/administration/bad-disk"
class="">
坏盘检修
</a>
</li>
<li>
<a href="/zh/administration/whitelist"
class="">
白名单
</a>
</li>
<li>
<a href="/zh/administration/backup-request"
class="">
Backup Request
</a>
</li>
<li>
<a href="/zh/administration/hotspot-detection"
class="">
热点检测
</a>
</li>
</ul>
</aside>
</div>
</div>
<!-- main section -->
<div class="dashboard-main is-scrollable">
<nav class="navbar is-hidden-desktop">
<div class="navbar-brand">
<a href="/zh/" class="navbar-item">
<!-- Pegasus Icon -->
<img src="/assets/images/pegasus-square.png">
</a>
<div class="navbar-item">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<!--If you don't want a url to be relativized, you can add a space explicitly into the href to
prevents a url from being relativized by polyglot.-->
<a class="button is-light is-outlined is-inverted" href=" /administration/deployment"><strong>En</strong></a>
</div>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<!-- Appears in mobile mode only -->
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
Pegasus产品文档
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/docs/downloads"
class="navbar-item ">
下载
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
编译构建
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/docs/build/compile-by-docker"
class="navbar-item ">
使用Docker完成编译(推荐)
</a>
<a href="/zh/docs/build/compile-from-source"
class="navbar-item ">
从源码编译
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
客户端库
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/clients/java-client"
class="navbar-item ">
Java客户端
</a>
<a href="/zh/clients/cpp-client"
class="navbar-item ">
C++客户端
</a>
<a href="https://github.com/apache/incubator-pegasus/tree/master/go-client"
class="navbar-item ">
Golang客户端
</a>
<a href="/zh/clients/python-client"
class="navbar-item ">
Python客户端
</a>
<a href="/zh/clients/node-client"
class="navbar-item ">
NodeJS客户端
</a>
<a href="/zh/clients/scala-client"
class="navbar-item ">
Scala客户端
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
生态工具
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/docs/tools/shell"
class="navbar-item ">
Pegasus Shell 工具
</a>
<a href="https://github.com/pegasus-kv/admin-cli"
class="navbar-item ">
集群管理命令行
</a>
<a href="https://github.com/pegasus-kv/pegic"
class="navbar-item ">
数据访问命令行
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
用户接口
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/api/ttl"
class="navbar-item ">
TTL
</a>
<a href="/zh/api/single-atomic"
class="navbar-item ">
单行原子操作
</a>
<a href="/zh/api/redis"
class="navbar-item ">
Redis适配
</a>
<a href="/zh/api/geo"
class="navbar-item ">
GEO支持
</a>
<a href="/zh/api/http"
class="navbar-item ">
HTTP接口
</a>
</div>
</div>
<!--dropdown-->
<div class="navbar-item has-dropdown is-hoverable">
<a href=""
class="navbar-link ">
<span>
高效运维
</span>
</a>
<div class="navbar-dropdown">
<a href="/zh/administration/deployment"
class="navbar-item is-active">
集群部署
</a>
<a href="/zh/administration/config"
class="navbar-item ">
配置说明
</a>
<a href="/zh/administration/rebalance"
class="navbar-item ">
负载均衡
</a>
<a href="/zh/administration/monitoring"
class="navbar-item ">
可视化监控
</a>
<a href="/zh/administration/rolling-update"
class="navbar-item ">
集群升级
</a>
<a href="/zh/administration/scale-in-out"
class="navbar-item ">
集群扩容缩容
</a>
<a href="/zh/administration/resource-management"
class="navbar-item ">
资源管理
</a>
<a href="/zh/administration/cold-backup"
class="navbar-item ">
冷备份
</a>
<a href="/zh/administration/meta-recovery"
class="navbar-item ">
元数据恢复
</a>
<a href="/zh/administration/replica-recovery"
class="navbar-item ">
Replica数据恢复
</a>
<a href="/zh/administration/zk-migration"
class="navbar-item ">
Zookeeper迁移
</a>
<a href="/zh/administration/table-migration"
class="navbar-item ">
Table迁移
</a>
<a href="/zh/administration/table-soft-delete"
class="navbar-item ">
Table软删除
</a>
<a href="/zh/administration/table-env"
class="navbar-item ">
Table环境变量
</a>
<a href="/zh/administration/remote-commands"
class="navbar-item ">
远程命令
</a>
<a href="/zh/administration/partition-split"
class="navbar-item ">
Partition-Split
</a>
<a href="/zh/administration/duplication"
class="navbar-item ">
跨机房同步
</a>
<a href="/zh/administration/compression"
class="navbar-item ">
数据压缩
</a>
<a href="/zh/administration/throttling"
class="navbar-item ">
流量控制
</a>
<a href="/zh/administration/experiences"
class="navbar-item ">
运维经验
</a>
<a href="/zh/administration/manual-compact"
class="navbar-item ">
Manual Compact功能
</a>
<a href="/zh/administration/usage-scenario"
class="navbar-item ">
Usage Scenario功能
</a>
<a href="/zh/administration/bad-disk"
class="navbar-item ">
坏盘检修
</a>
<a href="/zh/administration/whitelist"
class="navbar-item ">
白名单
</a>
<a href="/zh/administration/backup-request"
class="navbar-item ">
Backup Request
</a>
<a href="/zh/administration/hotspot-detection"
class="navbar-item ">
热点检测
</a>
</div>
</div>
</div>
</div>
</nav>
<nav class="navbar is-hidden-mobile">
<div class="navbar-start w-full">
<div class="navbar-item pl-0 w-full">
<!--TODO(wutao): Given the limitation of docsearch that couldn't handle multiple input,
I make searchbox only shown in desktop. Fix this issue when docsearch.js v3 released.
Related issue: https://github.com/algolia/docsearch/issues/230-->
<div id="docsearch"></div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<!--A simple language switch button that only supports zh and en.-->
<!--IF its language is zh, then switches to en.-->
<!--If you don't want a url to be relativized, you can add a space explicitly into the href to
prevents a url from being relativized by polyglot.-->
<a class="button is-light is-outlined is-inverted" href=" /administration/deployment"><strong>En</strong></a>
</div>
</div>
</nav>
<section class="hero is-info lg:mr-3">
<div class="hero-body">
<p class="title is-size-2 is-centered">集群部署</p>
</div>
</section>
<section class="section" style="padding-top: 2rem;">
<div class="content">
<h2 id="准备机器">准备机器</h2>
<p>Pegasus分布式集群至少需要准备这些机器:</p>
<ul>
<li>MetaServer:2~3台机器,无需SSD盘。</li>
<li>ReplicaServer:至少3台机器,建议挂SSD盘。譬如一台服务器挂着8块或者12块SSD盘。这些机器要求是同构的,即具有相同的配置。</li>
<li>Collector:可选角色,1台机器,无需SSD盘。该进程主要用于收集和汇总集群的统计信息,负载很小,建议放在MetaServer的其中一台机器上。</li>
</ul>
<h2 id="准备zookeeper">准备Zookeeper</h2>
<p>Pegasus集群依赖Zookeeper进行元数据存储和MetaServer抢锁,因此需要一个Zookeeper服务:</p>
<ul>
<li>如果在公司内部维护着Zookeeper集群,直接使用该集群就可以了。</li>
<li>如果没有,就自己搭建一个Zookeeper集群,建议在Pegasus集群机器所在的同机房搭建。</li>
</ul>
<p>记下Zookeeper的服务地址列表,后面配置文件要用。</p>
<h2 id="准备配置文件">准备配置文件</h2>
<p>我们提供了配置文件<a href="https://github.com/apache/incubator-pegasus/blob/master/src/server/config.ini">src/server/config.ini</a>(从1.7.1版本开始支持),你需要修改该文件,替换所有<code class="language-plaintext highlighter-rouge">%{xxx}</code>形式的变量为合适的值,如下:</p>
<table>
<thead>
<tr>
<th>变量</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>%{cluster.name}</td>
<td>集群名称。</td>
<td>my_cluster</td>
</tr>
<tr>
<td>%{home.dir}</td>
<td>HOME路径。</td>
<td>/home/work</td>
</tr>
<tr>
<td>%{app.dir}</td>
<td>程序工作路径,默认数据文件和日志文件都会放在这下面。</td>
<td>/home/work/app/pegasus</td>
</tr>
<tr>
<td>%{slog.dir}</td>
<td>存放Shared Commit Log文件的路径,建议放在一个独享的SSD盘上。如果没有可用的SSD盘,可以设置为空字符串,表示默认使用%{app.dir}。</td>
<td>/home/work/ssd1/pegasus</td>
</tr>
<tr>
<td>%{data.dirs}</td>
<td>存放各Replica数据的路径列表,可以用逗号分隔指定多个盘,每个路径需要指定一个名称,格式为<code class="language-plaintext highlighter-rouge">name1:path1,name2:path2</code>。如果没有可用的独立SSD盘,可以设置为空字符串,表示默认使用%{app.dir}。</td>
<td>ssd2:/home/work/ssd2/pegasus</td>
</tr>
<tr>
<td>%{meta.server.list}</td>
<td>MetaServer地址列表,用逗号分隔,格式为<code class="language-plaintext highlighter-rouge">ip1:port1,ip2:port2</code><strong>注意只能用IP地址,不能用hostname</strong></td>
<td>1.2.3.4:34601,1.2.3.5:34601</td>
</tr>
<tr>
<td>%{zk.server.list}</td>
<td>Zookeeper地址列表,用逗号分隔,格式为<code class="language-plaintext highlighter-rouge">ip1:port1,ip2:port2</code></td>
<td>1.2.3.4:2181,1.2.3.5:2181</td>
</tr>
</tbody>
</table>
<p>注意:同一个变量可能出现在多个地方,要保证所有的<code class="language-plaintext highlighter-rouge">%{xxx}</code>变量都被替换掉。</p>
<h3 id="多个ssd盘如何配置">多个SSD盘如何配置</h3>
<p>如果有多个SSD盘,推荐使用一个SSD盘专门用于shared log,其他盘用于存储replica数据。</p>
<p>譬如,假设机器有4个盘,挂载路径为/home/work/ssd{id},其中{id}=1,2,3,4。那么可以将ssd1用于shared log,可配置如下:</p>
<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[replication]</span>
<span class="py">slog_dir</span> <span class="p">=</span> <span class="s">/home/work/ssd1/pegasus</span>
<span class="py">data_dirs</span> <span class="p">=</span> <span class="s">ssd2:/home/work/ssd2/pegasus,ssd3:/home/work/ssd3/pegasus,ssd4:/home/work/ssd4/pegasus</span>
</code></pre></div></div>
<p>如果只有一个SSD盘,那么就没得选择,只能都用这一个盘。假设SSD盘挂载路径为/home/work/ssd,可配置如下:</p>
<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[replication]</span>
<span class="py">slog_dir</span> <span class="p">=</span> <span class="s">/home/work/ssd/pegasus/{cluster.name}</span>
<span class="py">data_dirs</span> <span class="p">=</span> <span class="s">ssd:/home/work/ssd/pegasus/{cluster.name}</span>
</code></pre></div></div>
<h3 id="多个网卡如何配置">多个网卡如何配置</h3>
<p>在配置文件中有以下section:</p>
<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[network]</span>
<span class="py">primary_interface</span> <span class="p">=</span>
<span class="py">io_service_worker_count</span> <span class="p">=</span> <span class="s">4</span>
</code></pre></div></div>
<p>通过primary_interface指定网卡:</p>
<ul>
<li>如果只有一个网卡,可以设置为空字符串,表示自动获取合适的网卡地址。具体策略就是在ifconfig的列表中查找第一个符合10.*.*.*/172.16.*.*/192.168.*.*的地址,这样就会忽略回环地址和虚拟地址。</li>
<li>如果有多个网卡,请指定网卡名。如果不指定,则会获取第一个符合10.*.*.*/172.16.*.*/192.168.*.*的地址。</li>
</ul>
<p>譬如,如果有多个网卡,想使用eth2所在网卡,可配置如下:</p>
<div class="language-ini highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">[network]</span>
<span class="py">primary_interface</span> <span class="p">=</span> <span class="s">eth2</span>
<span class="py">io_service_worker_count</span> <span class="p">=</span> <span class="s">4</span>
</code></pre></div></div>
<h2 id="准备部署包">准备部署包</h2>
<p>ReplicaServer/MetaServer/Collector三种角色的Server共用一套server程序和配置文件。</p>
<p>首先<a href="/zh/overview/compilation">编译Pegasus</a>,编译完成后运行以下命令可以打包生产server端部署包:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh pack_server
</code></pre></div></div>
<p>运行成功后,会在本地文件夹下生产<code class="language-plaintext highlighter-rouge">pegasus-server-{version}-{platform}-{buildType}</code>的文件夹以及tar.gz包。在文件夹里面有个bin/文件夹,里面包含pegasus_server程序及依赖库,还包括<strong>刚刚修改好的config.ini文件</strong></p>
<p>将部署tar.gz包拷贝到各个机器上,并解压。你可以使用合适的分布式分发工具来完成这件事情。</p>
<h2 id="启动服务">启动服务</h2>
<p>在启动程序之前,需要先把程序所依赖的动态链接库的路径加入到<code class="language-plaintext highlighter-rouge">LD_LIBRARY_PATH</code>中:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export LD_LIBRARY_PATH=/path/to/your/pegasus/bin:$LD_LIBRARY_PATH
</code></pre></div></div>
<p>启动MetaServer:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd bin/
./pegasus_server config.ini -app_list meta
</code></pre></div></div>
<p>启动ReplicaServer:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd bin/
./pegasus_server config.ini -app_list replica
</code></pre></div></div>
<p>启动Collector:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd bin/
./pegasus_server config.ini -app_list collector
</code></pre></div></div>
<p>集群启动成功后,会默认创建一个<code class="language-plaintext highlighter-rouge">temp</code>表,该表也用于Collector的集群可用度检查,最好不要删除。</p>
<p>你可以使用<a href="/zh/overview/shell">Shell工具</a>查看集群的各种状态。如果启动失败,可以到<code class="language-plaintext highlighter-rouge">%{app.dir}/log</code>下面查看错误日志,排查问题。</p>
<h1 id="分布式部署工具">分布式部署工具</h1>
<h2 id="minos部署">Minos部署</h2>
<p>我们在小米内部使用Minos工具部署,该工具也已经开源,参见<a href="https://github.com/XiaoMi/minos">XiaoMi/minos</a>。Minos工具能够基于配置模板动态生成合适的配置文件,操作简单,推荐使用。关于如何使用Minos的流程与细节,后续会补充相关文档。</p>
<h1 id="常见问题">常见问题</h1>
<h2 id="集群清理重建">集群清理重建</h2>
<p>如果想完全重新部署集群,<strong>以前的数据都不要了</strong>,需要清理以下环境,否则可能出现启动新集群失败的情况:</p>
<ul>
<li>清理MetaServer/ReplicaServer/Collector的<code class="language-plaintext highlighter-rouge">%{app.dir}</code><code class="language-plaintext highlighter-rouge">%{slog.dir}</code><code class="language-plaintext highlighter-rouge">%{data.dirs}</code>文件夹</li>
<li>删除Zookeeper的<code class="language-plaintext highlighter-rouge">/pegasus/%{cluster.name}</code>节点</li>
</ul>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content is-small has-text-centered">
<div style="margin-bottom: 20px;">
<a href="http://incubator.apache.org">
<img src="/assets/images/egg-logo.png"
width="15%"
alt="Apache Incubator"/>
</a>
</div>
Copyright &copy; 2023 <a href="http://www.apache.org">The Apache Software Foundation</a>.
Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br><br>
Apache Pegasus is an effort undergoing incubation at The Apache Software Foundation (ASF),
sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
until a further review indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects. While incubation status is
not necessarily a reflection of the completeness or stability of the code, it does indicate that the
project has yet to be fully endorsed by the ASF.
<br><br>
Apache Pegasus, Pegasus, Apache, the Apache feather logo, and the Apache Pegasus project logo are either
registered trademarks or trademarks of The Apache Software Foundation in the United States and other
countries.
</div>
</div>
</footer>
</div>
<!-- right panel -->
<div class="dashboard-panel is-small is-scrollable is-hidden-mobile">
<p class="menu-label">
<span class="icon">
<i class="fa fa-bars" aria-hidden="true"></i>
</span>
本页导航
</p>
<ul class="menu-list">
<li><a href="#准备机器">准备机器</a></li>
<li><a href="#准备zookeeper">准备Zookeeper</a></li>
<li><a href="#准备配置文件">准备配置文件</a>
<ul>
<li><a href="#多个ssd盘如何配置">多个SSD盘如何配置</a></li>
<li><a href="#多个网卡如何配置">多个网卡如何配置</a></li>
</ul>
</li>
<li><a href="#准备部署包">准备部署包</a></li>
<li><a href="#启动服务">启动服务</a></li>
<li><a href="#minos部署">Minos部署</a></li>
<li><a href="#集群清理重建">集群清理重建</a></li>
</ul>
</div>
</div>
<script src="/assets/js/app.js" type="text/javascript"></script>
<script>
docsearch({
container: '#docsearch',
appId: 'QRN30RBW0S',
indexName: 'pegasus-apache',
apiKey: 'd3a3252fa344359766707a106c4ed88f',
debug: true
});
</script>
</body>
</html>