Skip to content

Commit

Permalink
update storage/hwameistor/resources/expand (#5591)
Browse files Browse the repository at this point in the history
  • Loading branch information
WANG0608GitHub authored Sep 20, 2024
1 parent d3a70f2 commit 6e29ff8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
37 changes: 19 additions & 18 deletions docs/en/docs/storage/hwameistor/resources/expand.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ modifying the size of `PVC`. Currently, it supports both manual and automatic ex

## Manual Expansion

1. Access the proper cluster and navigate to **Storage** -> **Hwameistor**
1. Access the proper cluster and navigate to **Container Storage** -> **HwameiStor**

2. Click **Local Volume** . In the local volume list interface, select a local volume to perform the `expand` operation.
2. Click **Local Volumes** . On the right side of the local volume list, click **** and select **Expand** .

![expand01](../../images/expand01.png)

3. In the **Expand** dialog box, enter the new size for expansion. In this example, expand from `1G` to `10G`, then click **OK** .

3. In the `Expand` dialog box, enter the new size for expansion. In this example, expand from `1G` to `10G`, then click **OK** .


![expand02](../../images/expand02.png)

4. Refresh the current list and check that the capacity of the current local volume has changed from `1G` to `10G`.


![expand03](../../images/expand03.png)

## Automatic Expansion

Expand All @@ -41,12 +41,12 @@ spec:
The three int-type fields `warningThreshold`, `resizeThreshold`, and `nodePoolUsageLimit` represent percentages.

- `warningThreshold`: Currently not associated with any alert action. It serves as a target ratio,
meaning that after expansion, the volume usage will be below this percentage.
- `resizeThreshold`: Indicates a usage ratio. When the volume usage reaches this percentage,
the expansion action will be triggered.
- `nodePoolUsageLimit`: Represents the upper limit of node storage pool usage.
If the usage of a pool reaches this percentage, the volumes in this pool will not be automatically expanded.
- `warningThreshold` is currently not associated with any alert action. It serves as a target ratio, meaning that
after expansion, the volume usage will be below this percentage.
- `resizeThreshold` indicates a usage ratio. When the volume usage reaches this percentage, the expansion action
will be triggered.
- `nodePoolUsageLimit` represents the upper limit of node StorageClass usage. If the usage of a StorageClass reaches
this percentage, the volumes in this StorageClass will not be automatically expanded.

### Matching Rules

Expand Down Expand Up @@ -74,14 +74,15 @@ spec:

`ResizePolicy` has three label-selectors:

- `pvcSelector`: Indicates that the PVCs selected by this selector will be automatically expanded according to the policy.
- `namespaceSelector`: Indicates that the PVCs in the namespaces selected by this selector
- `pvcSelector` indicates that the PVCs selected by this selector will be automatically expanded according to the policy.
- `namespaceSelector` indicates that the PVCs in the namespaces selected by this selector
will be automatically expanded according to the policy.
- `storageClassSelector`: Indicates that the PVCs created from the storage classes selected by
- `storageClassSelector` indicates that the PVCs created from the StorageClass selected by
this selector will be automatically expanded according to the policy.

These three selectors have an "AND" relationship. If you specify multiple selectors in a `ResizePolicy`,
only the PVCs that meet all the selectors will match the policy. If no selector is specified in the `ResizePolicy`, it becomes a cluster-wide `ResizePolicy`, acting as the default policy for all PVCs in the cluster.
These three selectors have an "AND" relationship. If you specify multiple selectors in a `ResizePolicy`, only
the PVCs that meet all the selectors will match the policy. If no selector is specified in the `ResizePolicy`,
it becomes a cluster-wide `ResizePolicy`, acting as the default policy for all PVCs in the cluster.

## FAQs

Expand All @@ -104,7 +105,7 @@ Events:
Normal FileSystemResizeSuccessful 11s kubelet MountVolume.NodeExpandVolume succeeded for volume "pvc-b9fc8651-97b8-414c-8bcf-c8d2708c4ee8" k8s-worker-3
```

### How to Watch the Expanded `PVC/PV`?
### How to Watch the Expanded `PVC/PV`

```shell
kubectl get pvc data-sts-mysql-local-0
Expand Down
Binary file added docs/en/docs/storage/images/expand01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/docs/storage/images/expand02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en/docs/storage/images/expand03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/zh/docs/storage/hwameistor/resources/expand.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ HwameiStor 支持 `CSI 卷扩容` 。这个功能实现了通过修改 `PVC` 的

## 手动扩容数据卷

1. 进入对应集群,选择 **存储** -> **Hwameistor**
1. 进入对应集群,选择 **容器存储** -> **HwameiStor**

2. 点击 **本地卷**在本地卷列表界面,选择一条本地卷进行`扩容`操作
2. 点击 **本地卷**在本地卷列表中,点击一个本地卷右侧的 ****, 选择 **扩容**

![expand01](../../images/expand01.png)

Expand Down Expand Up @@ -73,7 +73,7 @@ spec:

- `pvcSelector` 表示被这个 selector 选中的 PVC 会依照选中它的 policy 自动扩容。
- `namespaceSelector` 表示被这个 selector 选中的 namespace 下的 PVC 会依照这个 policy 自动扩容。
- `storageClassSelector` 表示从被这个 selector 选中的 storageclass 创建出来的 PVC 会依照这个 policy 自动扩容。
- `storageClassSelector` 表示从被这个 selector 选中的 StorageClass 创建出来的 PVC 会依照这个 policy 自动扩容。

这三个 selector 之间是“且”的关系,如果你在一个 `ResizePolicy` 里指明了多个 selector,
那么要符合全部的 selector 的 PVC 才会匹配这个 policy。如果 `ResizePolicy` 中没有指明任何 selector,
Expand Down

0 comments on commit 6e29ff8

Please sign in to comment.