Back to all scenarios
Scenario #323
Storage
Kubernetes v1.21, Local Persistent Volumes

Application Writes Lost After Node Reboot

After a node reboot, pod restarted, but wrote to a different volume path, resulting in apparent data loss.

Find this helpful?
What Happened

Application data wasn’t persisted after a power cycle because the mount point dynamically changed.

Diagnosis Steps
  • 1Compared volume paths before and after reboot.
  • 2Found PV had hostPath mount with no stable binding.
  • 3Volume wasn’t pinned to specific disk partition.
Root Cause

Local PV was defined with generic hostPath, not using local volume plugin with device references.

Fix/Workaround
• Refactored PV to use local with nodeAffinity.
• Explicitly mounted disk partitions.
Lessons Learned

hostPath should not be used for production data.

How to Avoid
  • 1Always use local storage plugin for node-local disks.
  • 2Avoid loosely defined persistent paths.