diff --git a/doc/use_multiple_volumes_how_to.md b/doc/use_multiple_volumes_how_to.md index d6983f1d..ce1f4c79 100644 --- a/doc/use_multiple_volumes_how_to.md +++ b/doc/use_multiple_volumes_how_to.md @@ -1,6 +1,7 @@ # Deploy StarRocks with Multiple Volumes This document describes how to use multiple volumes to store StarRocks data. +> Note: After installation, you are not allowed to modify the volume related fields no matter in the CRD or Helm Chart. # Deploy StarRocks with Multiple Volumes By Helm Chart @@ -47,36 +48,6 @@ starrocks: name: be-storage storageCount: 2 # specify the number of volumes storageSize: 10Gi # the size of each volume - starrocksCluster: - enabledBe: true - enabledCn: true - starrocksCnSpec: - cnEnvVars: - # add storage_root_path in StarRocks config - config: | - sys_log_level = INFO - # ports for admin, web, heartbeat service - thrift_port = 9060 - webserver_port = 8040 - heartbeat_service_port = 9050 - brpc_port = 8060 - storage_root_path = /opt/starrocks/cn/storage0;/opt/starrocks/cn/storage1;/opt/starrocks/cn/storage2 - image: - repository: starrocks/cn-ubuntu - tag: 3.2.2 - replicas: 1 - resources: - limits: - cpu: 8 - memory: 8Gi - requests: - cpu: 1m - memory: 10Mi - storageSpec: - logStorageSize: 1Gi - name: cn - storageCount: 3 # specify the number of volumes - storageSize: 10Gi # the size of each volume starrocksFESpec: image: repository: starrocks/fe-ubuntu @@ -95,7 +66,39 @@ starrocks: ``` Note: - 1. add `storage_root_path` field in StarRocks config. 2. use `storageCount` to specify the number of volumes. -3. the `storage` directory still exists in the container, but will not be used to store data. \ No newline at end of file +3. the `storage` directory still exists in the container, but will not be used to store data. + +## What if I want to use different storageClass or storageSize for each volume? + +This feature is not supported in Helm Chart. The following is a workaround: + +```bash +# starrocks-community is a helm chart repository, you can show yours by `helm repo list` +# kube-starrocks is the name of the helm chart +helm template starrocks starrocks-community/kube-starrocks -f ./values.yaml >./sr.yaml + +# From the sr.yaml, there will a Custom Resource Definition (CRD) named StarRocksCluster. +# You can modify the CRD to use different storageClass or storageSize for each volume. +storageVolumes: +- name: be0-data +storageClassName: "standard" # you can change the storageClassName +storageSize: "10Gi" # you can change the storageSize +mountPath: /opt/starrocks/be/storage0 +- name: be1-data +storageClassName: "standard" +storageSize: "10Gi" +mountPath: /opt/starrocks/be/storage1 +- name: be-log +storageClassName: +storageSize: "1Gi" +mountPath: /opt/starrocks/be/log +- name: be-spill +storageClassName: +storageSize: "0Gi" +mountPath: /opt/starrocks/be/spill + +# After modifying the CRD, you can apply it to your Kubernetes cluster. +kubectl apply -f sr.yaml +``` \ No newline at end of file