ccm resizePVC command

Last Updated : Sep 28, 2022 |

The resizePVC command increases the size of a Kubernetes Persistent Volume Claim (PVC). This command creates a new PVC that is the size specified and copies the existing application data into the new PVC. Technical staff can resize the disk space allocated to a service after it is deployed while preserving the original data.

Command requirements and technical constraints

  • You must know the names of the PVCs that are to be resized.

  • Only File System type PVC volumes are supported.

  • Resizing is only supported on VMware.

  • Services using the specified PVCs are taken offline during resize operations.

  • Do not run installation and upgrade tasks concurrently.

Disk space considerations

  • The cluster storage provider must have adequate free space for each resized PVC.

    For example, when resizing 3 PVCs and the existing size is 25GB and the destination size is 40GB, the storage provider requires 120GB of free space. After the command completes, an additional 45GB is consumed.

  • If multiple PVCs are specified for resize in a single command, they are executed concurrently. If insufficient storage is available to execute all commands concurrently, resize each PVC individually.

    In the example, 120GB of free space is required at the time of the command. If PVCs are resized individually, the required free space is 70GB.

Usage

After a service is deployed, you can run the following command to resize the disk space allocated to the service: ccm resizePVC <NewSize(Mi|Gi)> <pvc-name-1> <pvc-name-2> <pvc-name-n>

Example 1: ccm resizePVC 30Gi datadir-0-eventing-kafka-cp-kafka-0 datadir-0-eventing-kafka-cp-kafka-1 datadir-0-eventing-kafka-cp-kafka-2

Example 2: ccm resizePVC 5Gi alarming-db-service-pgo-repo1

For details about resizing a PVC using a spreadsheet, see Resize PVC using a spreadsheet.