KubeErrors

FileSystemResizePending: The volume was expanded but the filesystem inside it has not been

This condition means the underlying disk has grown and the filesystem still has to be resized to use the new space. For most drivers that happens on the node, which is why the pod may need to restart.

Applies to: Kubernetes versions supporting volume expansion

What it means

Expanding a volume has two stages. The controller grows the block device at the storage backend, then the filesystem on it is grown so the extra space is usable. FileSystemResizePending is the state between the two. Many CSI drivers perform the filesystem stage on the node, which historically required the pod to be restarted; online expansion, where the filesystem grows while the pod runs, is supported by many drivers now but not all. The practical consequence is that a claim reporting the new size while the container still sees the old one is expected during this window, and is resolved by the node-side stage completing rather than by anything at the claim level.

Most common causes

How to diagnose it

  1. Read the claim's conditions: kubectl describe pvc CLAIM -n NAMESPACE.
  2. Compare the requested and actual capacity: kubectl get pvc CLAIM -o jsonpath='{.spec.resources.requests.storage} {.status.capacity.storage}'.
  3. Check what the container sees: kubectl exec POD -- df -h /mount/path.
  4. Check the CSI node plugin's logs on that node for the resize operation.
  5. Confirm the driver supports online expansion for the filesystem in use.

How to fix it

  1. Wait, if online expansion is supported — the condition clears on its own.
  2. Restart the pod if the driver requires it. For a StatefulSet this means deleting the pod and letting it be recreated.
  3. Ensure the CSI node plugin is running on the node.
  4. Confirm allowVolumeExpansion: true is set on the StorageClass; without it the expansion is rejected before it starts.

Notes

Volume expansion is one-way. Kubernetes does not support shrinking a PersistentVolumeClaim, so an over-generous expansion cannot be undone without migrating the data to a smaller volume.

Related

Sources

Pages on this site are written with AI assistance from the primary sources listed on each page, then checked against those sources before publishing.