-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support changing cacheVolume of cn and dn after mo is deployed #1170
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -688,6 +688,49 @@ __Note:__ 本章节均是在 master0 节点操作。 | |
mo-tp-cn-0 1/1 Running 0 50s | ||
``` | ||
|
||
### 动态扩容 | ||
|
||
Operator 支持 TN、CN 的 cacheVolume 配置动态扩容,不支持缩容操作,扩容过程前后,CN、TN pod 无需重启。具体步骤如下: | ||
|
||
1. 确保 StorageClass 支持卷扩展功能 | ||
|
||
```bash | ||
#查看 storageclass 名称 | ||
>kubectl get pvc -n ${MO_NS} | ||
|
||
#查看 StorageClass 是否支持卷扩展功能 | ||
>kubectl get storageclass ${SC_NAME} -oyaml | grep allowVolumeExpansion #SC_NAME 是 mo 集群使用的 pvc 的 sc 类型 | ||
allowVolumeExpansion: true #只有为 true 时,才可以执行后续步骤 | ||
``` | ||
|
||
2. 进入集群配置编辑模式 | ||
|
||
```bash | ||
kubectl edit mo -n ${MO_NS} ${MO_NAME} # 其中 MO_NS 为部署 MO 集群的命名空间,MO_NAME 为 MO 集群的名称;例如 MO_NS=matrixone; MO_NAME=mo_cluster | ||
``` | ||
|
||
3. 按需修改 tn 和 cn 的 cacheVolume 的 size 大小 | ||
|
||
```bash | ||
- cacheVolume: | ||
size: 900Gi | ||
``` | ||
|
||
- 如果为 CN group,则修改 spec.cnGroups[0]. cacheVolume(或 spec.cnGroups[1]. cacheVolume,其中 [n] 中的 n 为 CN Group 的数组下标); | ||
- 如果为 CN,则修改 spec.tp.cacheVolume; | ||
- 如果为 TN,则修改 spec.tn.cacheVolume(或 spec.dn.cacheVolume)。 | ||
|
||
然后保存并退出:按 `esq` 键,和 `:wq` | ||
|
||
4. 查看扩容结果 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 提示注意 |
||
|
||
```bash | ||
#`CAPACITY`字段值为扩容后数值 | ||
>kubectl get pvc -n ${MO_NS} | ||
|
||
>kubectl get pv | grep ${NS} | ||
``` | ||
|
||
## 6. 连接 MatrixOne 集群 | ||
|
||
为了连接 MatrixOne 集群,您需要将对应服务的端口映射到 MatrixOne 节点上。以下是使用 `kubectl port-forward` 连接 MatrixOne 集群的指导: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
视乎修改的对象:
1、如果为CN group,则修改
spec.cnGroups[0].cacheVolume
(或spec.cnGroups[1].cacheVolume
,其中[n]
中的n
为CN Group的数组下标);2、如果为CN,则修改
spec.tp.cacheVolume
3、如果为TN,则修改
spec.tn.cacheVolume
(或spec.dn.cacheVolume
)