Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-guides-for-how-to-add-disks- #2811

Merged
merged 10 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 38 additions & 15 deletions docs-2.0/20.appendix/0.FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,31 +357,54 @@ $ ./nebula-graphd --version

执行`rpm -qa |grep nebula`即可查看版本。

{{ ent.ent_begin }}
### 如何扩缩容(仅限企业版)
### 如何扩缩容

- 使用悦数运维监控,在可视化页面对 graphd 和 storaged 进行快速扩缩容,详情参见[集群操作-扩缩容](../nebula-dashboard-ent/4.cluster-operator/operator/scale.md)。
- 使用 NebulaGraph Operator 扩缩容集群,详情参见[使用 Kubectl 部署{{nebula.name}}集群](../nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md)和[使用 Helm 部署{{nebula.name}}集群](../nebula-operator/3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md)。
{{comm.comm_begin}}
!!! warning

集群扩缩容功能未正式在社区版中发布。以下涉及`BALANCE DATA REMOVE`和`BALANCE DATA`的操作在社区版中均为实验性功能,功能未稳定。如需使用,请先做好数据备份,并且在 [Graph 配置文件](../5.configurations-and-logs/1.configurations/3.graph-config.md)中将`enable_experimental_feature`设置为`true`。
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

{{nebula.name}} {{ nebula.release }} 未提供运维命令以实现自动扩缩容,参考以下步骤:
{{comm.comm_end}}

- metad 的扩容和缩容: metad 不支持自动扩缩容。
#### 增加或减少 Meta、Graph、Storage 节点的数量

- {{nebula.name}} {{ nebula.release }} 未提供运维命令以实现自动扩缩容,但可参考以下步骤实现手动扩缩容:

- Meta 的扩容和缩容: Meta 不支持自动扩缩容。

!!! note

用户可以使用[脚本工具](https://github.com/vesoft-inc/nebula/blob/master/scripts/meta-transfer-tools.sh) 迁移 Meta 服务,但是需要自行修改 Graph 服务和 Storage 服务的配置文件中的 Meta 设置。

- Graph 的缩容:将该 Graph 的 IP 从 client 的代码中移除,关闭该 Graph 进程。

- Graph 的扩容:在新机器上准备 Graph 二进制文件和配置文件,在配置文件中修改或增加已在运行的 Meta 地址,启动 Graph 进程。

- Storage 的缩容:执行`BALANCE DATA REMOVE <ip:port>`和`DROP HOSTS <ip:port>`。完成后关闭 Storage 进程。

- Storage 的扩容:在新机器上准备 Storage 二进制文件和配置文件,在配置文件中修改或增加已在运行的 Meta 地址,然后注册 Storage 到 Meta 并启动 Storage 进程。详情参见[注册 Storage 服务](../2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts.md)。

Storage 扩缩容之后,还需要运行`BALANCE DATA`和`BALANCE LEADER`命令均衡数据和 Leader 分布。
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

{{ent.ent_begin}}
- 使用悦数运维监控,在可视化页面对 Graph 和 Storage 进行快速扩缩容,详情参见[集群操作-扩缩容](../nebula-dashboard-ent/4.cluster-operator/operator/scale.md)。

- 使用 NebulaGraph Operator 扩缩容集群,详情参见[使用 Kubectl 部署{{nebula.name}}集群](../nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md)和[使用 Helm 部署{{nebula.name}}集群](../nebula-operator/3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md)。
{{ent.ent_end}}

!!! note

用户可以使用[脚本工具](https://github.com/vesoft-inc/nebula/blob/master/scripts/meta-transfer-tools.sh) 迁移 meta 服务,但是需要自行修改 Graph 服务和 Storage 服务的配置文件中的 Meta 设置。

- graphd 的缩容:将该 graphd 的 ip 从 client 的代码中移除,关闭该 graphd 进程。
#### 如何在 Storage 节点中增加磁盘
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

- graphd 的扩容:在新机器上准备 graphd 二进制文件和配置文件,在配置文件中修改或增加已在运行的 metad 地址,启动 graphd 进程。
目前,Storage 不支持动态识别新的磁盘。可以通过以下步骤在分布式集群的 Storage 节点中增加磁盘{{comm.comm_begin}}(不支持对单个 Storage 节点的集群增加磁盘){{comm.comm_end}}:

- storaged 的缩容:详情参见[缩容命令](../8.service-tuning/load-balance.md#_5)。完成后关闭 storaged 进程
1. 执行`BALANCE DATA REMOVE <ip:port>`将待增加磁盘的 Storage 节点迁到其他 Storage 节点中
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved

- storaged 的扩容:在新机器上准备 storaged 二进制文件和配置文件,在配置文件中修改或增加已在运行的 metad 地址,然后注册 storaged 到 metad 并启动 storaged 进程。详情参见[注册 Storage 服务](../2.quick-start/3.quick-start-on-premise/3.1add-storage-hosts.md)
2. 执行`DROP HOSTS <ip:port>`移除待增加磁盘的 Storage 节点

storaged 扩缩容之后,还需要运行 [Balance Data 和 Balance Leader 命令](../8.service-tuning/load-balance.md)。
3. 在所有 Storage 节点配置文件中通过`--data_path`配置新增磁盘路径,详情参见[ Storage 配置文件](../5.configurations-and-logs/1.configurations/4.storage-config.md)。
4. 执行`ADD HOSTS <ip:port>`重新添加待增加磁盘的 Storage 节点。
5. 执行`BALANCE DATA`和`BALANCE LEADER`将数据均匀分布到新增磁盘上。

{{ ent.ent_end }}

### 修改 Host 名称后,旧的 Host 一直显示 `OFFLINE` 怎么办?

Expand Down
17 changes: 12 additions & 5 deletions docs-2.0/8.service-tuning/load-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@

`SUBMIT JOB BALANCE`命令通过创建和执行一组子任务来迁移数据和均衡分片分布,**禁止**停止集群中的任何机器或改变机器的 IP 地址,直到所有子任务完成,否则后续子任务会失败。

{{ ent.ent_begin }}
{{ comm.comm_begin }}
## 均衡分片分布

!!! enterpriseonly

仅企业版支持均衡分片分布。
{{ comm.comm_end }}

{{ ent.ent_begin }}
## 均衡分片分布

!!! enterpriseonly
Expand Down Expand Up @@ -108,12 +115,12 @@
```ngql
nebula> SUBMIT JOB BALANCE DATA REMOVE 192.168.8.100:9779;
abby-cyber marked this conversation as resolved.
Show resolved Hide resolved
nebula> SHOW HOSTS;
+-----------------+------+----------+--------------+-----------------------+------------------------+-------------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-----------------+------+----------+--------------+-----------------------+------------------------+-------------+
+-----------------+------+----------+--------------+-----------------------+------------------------+----------------------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution | Version |
+-----------------+------+----------+--------------+-----------------------+------------------------+----------------------+
| "192.168.8.101" | 9779 | "ONLINE" | 15 | "basketballplayer:15" | "basketballplayer:15" | "{{nebula.release}}" |
| "192.168.8.100" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | "{{nebula.release}}" |
+-----------------+------+----------+--------------+-----------------------+------------------------+-------------+
+-----------------+------+----------+--------------+-----------------------+------------------------+----------------------+
```

!!! note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{{comm.comm_begin}}
创建名为`apps_v1alpha1_nebulacluster.yaml`的文件。文件内容参见[示例配置](https://github.com/vesoft-inc/nebula-operator/blob/v{{operator.release}}/config/samples/apps_v1alpha1_nebulacluster.yaml)。
{{comm.comm_begin}}
{{comm.comm_end}}

{{ent.ent_begin}}
联系销售人员获取完整配置示例。
Expand Down