Skip to content
AITroveRead. Build. Understand.
Make this comfortable

PVC expansion: verify both backing volume and usable filesystem

Last updated: 5 Oct 20266 min read
tutorial
AdvancedBy AITrove Editorial

A PVC size increase requests more storage from a supporting driver and StorageClass. Provisioning the larger backing volume and growing the filesystem are related but distinct stages. Some filesystems and drivers can complete growth while mounted; others require a remount or Pod restart. Kubernetes volume expansion grows a claim but does not provide a general shrink operation. A larger requested number is not evidence that the database sees more usable space.

Operational decision

The receipt ledger has 8 GiB free and its ingestion forecast needs 31 GiB of additional headroom. Confirm the StorageClass permits expansion, the CSI driver supports it, the provider quota and billing allow the target size, and a restorable copy exists. Patch a disposable claim to the reviewed size shown below, then watch claim conditions, controller and node events, PV capacity, and filesystem free space inside the Pod. Write and read a synthetic record beyond the old capacity boundary. If the controller expands the device but the filesystem does not grow, follow that driver and filesystem's restart procedure during a maintenance window; do not repeatedly increase the request in hope of clearing a stuck condition. Record the original and target size, expansion latency, and the point at which the application can use the space. Repeat the procedure after an injected node restart.

bash
kubectl -n checkout patch pvc receipt-ledger-writer --type merge -p '{"spec":{"resources":{"requests":{"storage":"79Gi"}}}'
kubectl -n checkout describe pvc receipt-ledger-writer

Cost and verification

Capacity charges normally increase with provisioned volume size, and some providers also charge for performance tiers or snapshots. Expansion may consume I/O and delay a restart, so schedule it before the filesystem is nearly full. Measure application-visible free bytes, expansion duration, failed resize events, and database write latency. The numerical target is illustrative: calculate it from growth rate, retention, filesystem reserve, and provider limits for the real workload.

Common Mistakes

  • Do not edit the PV capacity field directly as a substitute for a PVC resize.
  • Do not assume a larger PVC request means the filesystem has grown.
  • Do not plan to shrink the same claim after an overestimate.

Connected lessons

Practice and check

devops
operations
Storage details