Increase the ClickHouse Persistent Volume Size

Self-Host - This page applies to self-hosted SigNoz editions.

You can use the following helm upgrade command to increase the size of the persistent volume used by SigNoz.

Replace the following values to match your environment:

  • Your namespace (this example uses platform)
  • Your release (this example uses my-release)
  • Your chart (this example uses signoz/signoz)
  • The new size of the persistent volume (this example uses 25Gi)

Check if Volume Expansion is Allowed

Before you proceed, run the following command to check if your storage class allows volume expansion:

kubectl get storageclass -o json | jq '.items[]|.metadata.name + ": " + (.allowVolumeExpansion|tostring)'

Output should be similar as below:

"standard: false"
"standard-resizable: true"

If the storage class used by SigNoz cluster PVCs returns true, that means you can directly proceed with increase persistent volume section.

If false, proceed with any of the following relevent section:

Increase Persistent Volume

You should be able to increase clickhouse persistent volume size easily with the following, if you have SigNoz cluster with expandable storage class.

helm -n platform upgrade my-release signoz/signoz \
  --set clickhouse.persistence.size=25Gi

EKS - Amazon Web Service (AWS)

You can follow the increase persistent volume section if you had started the SigNoz cluster with expandable storage class as mentioned below:

helm -n platform install my-release signoz/signoz \
   --set clickhouse.installCustomStorageClass=true \
   --set clickhouse.cloud=aws \
   --set clickhouse.persistence.storageClass=gp2-resizable

If you had started with default configurations, you would have to follow the steps below:

  1. You would have to edit default storage class i.e. gp2 and patch the allowVolumeExpansion to true.

    kubectl patch storageclass gp2 -p '{"allowVolumeExpansion": true}'

    Output:

    storageclass.storage.k8s.io/gp2 patched
  2. Run helm upgrade command:

    helm -n platform upgrade my-release signoz/signoz \
      --set clickhouse.persistence.size=25Gi
  3. (Optional) After the size change reflects in few minutes, you could edit the default storage class gp2 back to its previous state.

GKE - Google Cloud Platform (GCP)

You can follow the increase persistent volume section if you had started the SigNoz cluster with expandable storage class as mentioned below:

helm -n platform install my-release signoz/signoz \
   --set clickhouse.installCustomStorageClass=true \
   --set clickhouse.cloud=gcp \
   --set clickhouse.persistence.storageClass=gce-resizable

If you had started with default configurations, you would have to follow the steps below:

  1. You would have to edit default storage class i.e. pd-standard, and patch the allowVolumeExpansion to true.

    kubectl patch storageclass pd-standard -p '{"allowVolumeExpansion": true}'

    Output:

    storageclass.storage.k8s.io/pd-standard patched
  2. Now, run helm upgrade command:

    helm -n platform upgrade my-release signoz/signoz \
      --set clickhouse.persistence.size=25Gi
  3. (Optional) After the size change reflects in few minutes, you could edit the default storage class pd-standard back to its previous state.

Other Kubernetes Cloud Platform and Bare-Metal Servers

You can follow the increase persistent volume section if you had started the SigNoz cluster with expandable storage class - let's say custom-resizable-storage-class as mentioned below:

helm -n platform install my-release signoz/signoz \
   --set clickhouse.persistence.storageClass=custom-resizable-storage-class

If you had started with default configurations, you would have to follow the steps below:

  1. You would have to edit default storage class i.e. standard in case of kind cluster - it could be different in your scenerio, and patch the allowVolumeExpansion to true.

    DEFAULT_STORAGE_CLASS=$(kubectl get storageclass -o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}')
     
    kubectl patch storageclass "$DEFAULT_STORAGE_CLASS" -p '{"allowVolumeExpansion": true}'

    Output should be similar to the following:

    storageclass.storage.k8s.io/standard patched
  2. Run helm upgrade command:

    helm -n platform upgrade my-release signoz/signoz \
      --set clickhouse.persistence.size=25Gi
  3. (Optional) After the size change reflects in few minutes, you could edit the default storage class standard - or some other storage class as per your previous output, back to its previous state.

Last updated: June 06, 2024

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.