Back to Blog
Education

How to Expand Kubernetes Persistent Volumes Safely

April WongApril Wong
5 min read
How to Expand Kubernetes Persistent Volumes Safely

A database running out of disk does not automatically need more CPU. It needs usable capacity, enough time to add it, and a change procedure that preserves service. Kubernetes can coordinate persistent-volume expansion, but whether a running application can keep using the volume depends on the storage driver, filesystem, and deployment. Verify that path before the free-space alert becomes an incident.

TL;DR

  • Check the exact CSI driver, StorageClass, filesystem, and supported expansion path.
  • Increase the persistent volume claim, then verify both storage capacity and application-visible space.
  • Measure latency and errors during the change; a larger PVC alone is not acceptance.
  • Plan recovery through a tested backup or migration. Volume expansion is not normally reversible by shrinking the claim.

What must be true before a PVC can grow?

The StorageClass must permit expansion, and the storage implementation must support it. Inspect the claim and its bound volume rather than assuming every workload uses the cluster’s default class. Record the provisioner and driver version, volume mode, filesystem, existing capacity, and requested target.

# Read-only inspection; replace these example names.
kubectl get pvc data-analytics-0 -n analytics -o yaml
kubectl get storageclass analytics-storage -o yaml
kubectl describe pvc data-analytics-0 -n analytics

In the class, look for allowVolumeExpansion: true. Confirm the driver’s expansion support separately. An enabled field is not a promise of online filesystem growth. Kubernetes documents expansion for supported filesystems and drivers in its persistent-volume guide.

Identify the application owner before making the change. A database operator, StatefulSet configuration, or infrastructure repository may be the intended source of truth. Follow that system’s supported procedure so a later reconciliation does not conflict with the manual change. Record which existing claims and future replicas need the new size.

How much capacity should you add?

Choose a target from growth and operating headroom. Include temporary files, compaction or merge work, retained logs, and the time needed to respond to the next alert. The daily average can hide a large import or a maintenance operation.

For an illustrative workload, suppose a volume contains 700 GiB, grows by 15 GiB per day, and needs room for a 200 GiB temporary operation. Over a 14-day planning horizon, the requirement before additional reserve is:

700 GiB + (15 GiB/day × 14 days) + 200 GiB = 1,110 GiB

A 1,250 GiB target would leave 140 GiB beyond those assumptions. That is arithmetic for this example, not a universal sizing recommendation. Validate the growth estimate and temporary-space requirement against your workload, and check provider limits, quota, billing units, and expansion increments before selecting the final target.

Capacity and performance are separate questions. Increasing space may or may not change throughput or IOPS under your storage product’s rules. If latency is the problem, establish whether the workload is limited by storage, CPU, concurrency, or query design before expecting expansion to help. Our ClickHouse storage sizing guide covers that workload-level evaluation.

Can you expand while the application is running?

Use a staging copy with the same driver, filesystem, mount configuration, and application version. Run representative reads and writes while expanding. Record the requested size, controller progress, filesystem-visible size, application errors, and latency through the change.

Observed stateWhat to do
Driver and filesystem support online expansion; rehearsal succeedsUse the tested procedure with monitoring and an incident owner
Filesystem expansion requires a restart or remountSchedule the required application maintenance and follow its availability procedure
Support is unclear or rehearsal failsResolve the driver issue or plan a migration to a larger volume
Volume grows but application errors increaseTreat the change as incomplete and investigate the workload impact

For replicated databases, determine how maintenance affects quorum, replica health, and failover. Do not assume that restarting one pod is harmless merely because a second exists. Rehearse the database’s supported sequence and make the maintenance decision before production space becomes critical.

Nirvana’s NKS storage documentation is the starting point for its storage integration. Confirm the exact expansion behavior for your deployed class and driver with the team. A platform’s ability to supply more storage does not by itself establish zero downtime for every application.

How do you make and verify the change?

After the rehearsal and recovery checks, increase the requested storage on the PVC through your approved configuration path. The example below changes a claim to the illustrative target above; it is not a command to apply unchanged to another environment.

kubectl patch pvc data-analytics-0 -n analytics \
  --type merge \
  -p '{"spec":{"resources":{"requests":{"storage":"1250Gi"}}}}'

kubectl describe pvc data-analytics-0 -n analytics

Change the PVC request, not the PV’s capacity field. Kubernetes warns that manually changing PV capacity can interfere with automatic resizing. Watch events and conditions, then inspect usable space inside the application’s actual mount. For a filesystem volume, an appropriate filesystem-space check complements the Kubernetes status. For raw block volumes, follow the application’s storage procedure instead.

Keep the workload running long enough to observe the operation that caused the capacity pressure: a batch import, merge cycle, index build, or log rotation. Verify successful writes and reads, expected free space, and agreed latency and error limits. Record the before-and-after state in the change ticket.

What should you do if expansion fails?

Inspect the reported failure first: provider quota, unsupported size, driver errors, and node-side filesystem issues need different responses. Avoid repeatedly raising the requested size without understanding the error. Kubernetes documents recovery from failed expansion requests; available recovery behavior depends on the cluster version. See the Kubernetes v1.34 expansion-failure explanation.

Reducing a failed target request, where supported, is not shrinking an already expanded disk. If you need to return to a smaller allocation or recover from application damage, use a tested restore or migration procedure. Preserve the original volume until the replacement passes validation and the retention decision is explicit.

Frequently asked questions

Does a larger PVC prove the database has more space?

No. Verify the mounted filesystem or application storage layer as well as the claim and volume status.

Will expansion make queries faster?

Only if the storage product and workload make that true. Measure query latency and throughput separately from capacity.

Should I delete and recreate the PVC to recover?

Do not make deletion your routine recovery step. Reclaim policy and application configuration determine the consequences. Use the supported driver and database procedure.

Need room for a growing stateful workload? Explore Nirvana’s storage cloud, then test the change with your application. Pair this procedure with the stateful Kubernetes recovery checklist.

Technical references reviewed 14 October 2026. Capacity figures are illustrative; this article does not report measured expansion time or downtime.


About Nirvana Labs

Nirvana Labs is a high-performance storage cloud purpose built for blockchain, AI and databases i.e. the most demanding, real-time, stateful workloads. Accelerated Block Storage (ABS) offers 20K baseline IOPS included, no over provisioning. Nirvana Kubernetes Service (NKS) with Karpenter auto-scaling, high clock-speed compute and private networking. Backed by Jump Trading, Crucible, etc with 50+ customers live in production today.

Learn more about Nirvana Labs.

Nirvana Cloud · Pricing · Blog · Docs · Changelog · LinkedIn · Twitter · Telegram · YouTube

Powering AI, blockchain, and
databases

Talk to Sales