Expand PersistentVolumeClaim (PVC)

Expand your persistent volume claim by editing the REC.

This article outlines steps to increase the size of the persistent volume claim for your Redis Enterprise cluster (REC).

PersistentVolumeClaims (PVC) are created by the Redis Enterprise operator and used by the RedisEnterpriseCluster (REC). PVCs are created with a specific size and can be expanded with the following steps, if the underlying storage class supports it.

This process involves deleting and recreating the REC StatefulSet with a larger persistent volume size. The pods owned by the StatefulSet are not restarted or affected by the deletion and recreation process, except when they are left without an owner momentarily.

Note:
Shrinking (reducing the size) of your PVC is not allowed. This process only allows you to expand (size up) your PVC.

Prerequisites

Warning:
Do not change any other REC fields related to the StatefulSet while resizing is in progress.
  • PVC expansion must be supported and enabled by the StorageClass and underlying storage driver of the REC PVCs.
    • The relevant StorageClass is the one associated with the REC PVCs. The StorageClass for existing PVCs cannot be changed.
  • The StorageClass must be configured with allowVolumeExpansion: true.
  • Your storage driver must support online expansion.
  • We highly recommend you backup your databases before beginning this PVC expansion process.

Expand REC PVC

  1. Enable the REC persistent volume resize flag.

      spec:
        persistentSpec:
          enablePersistentVolumeResize: true
    
  2. Set the value of volumeSize to your desired size.

      spec:
        persistentSpec:
          enablePersistentVolumeResize: true
          volumeSize: <new-size>
    
  3. Apply the changes to the REC, replacing <your-rec.yaml> with the name of your REC.

kubectl apply -f <your-rec.yaml>

After applying the REC changes, the PVCs will begin to expand to the new size.

Once all the PVCs finish the resizing process, the operator will delete and recreate the StatefulSet with the new volume size.

Track progress

You can track the progress by monitoring the status of the REC and PersistentVolumeClaim objects.

The REC status will correspond to the status of one or more PVCs, and will reflect if the resizing is successful or failed.

While the resizing is in progress, the status will be:

status:
  persistenceStatus:
    status: Resizing
    succeeded: 2/3

When the resizing is complete, the status becomes Provisioned and the new volume size is available for use by the REC pods.

status:
  persistenceStatus:
    status: Provisioned
    succeeded: 3/3

Troubleshooting

If an error occurs during this process:

  • Examine the status and events of the REC and PVC objects.

    kubectl describe pvc
    
    kubectl get events
    
  • Examine the logs of the operator pods.

    kubectl logs <operator_pod_name>
    
RATE THIS PAGE
Back to top ↑