Back to all scenarios
Scenario #339
Storage
Kubernetes v1.24, PVC with subPath

App Breaks Due to Missing SubPath After Volume Expansion

After PVC expansion, the mount inside pod pointed to root of volume, not the expected subPath.

Find this helpful?
What Happened

Application was configured to mount /data/subdir. After resizing, pod restarted, and subPath was ignored, mounting full volume at /data.

Diagnosis Steps
  • 1Pod logs showed missing directory structure.
  • 2Inspected pod spec: subPath was correct.
  • 3CSI logs: subPath expansion failed due to permissions.
Root Cause

CSI driver did not remap subPath after resize correctly.

Fix/Workaround
• Changed pod to recreate the subPath explicitly.
• Waited for bugfix release from CSI provider.
Lessons Learned

PVC expansion may break subPath unless handled explicitly.

How to Avoid
  • 1Avoid complex subPath usage unless tested under all lifecycle events.
  • 2Watch CSI release notes carefully.