Persistent Volume
Pronunciationper-SIS-tent VOL-yoom
Definition
A persistent volume is storage attached to a container whose data survives when the container is stopped, replaced or rescheduled, unlike the container's own temporary file system.
Where you hear it
In Docker -v flags, Kubernetes PV/PVC objects, and running databases in containers.
Examples
Mount a volume at
/var/lib/postgresql/dataso the data survives restarts.Without a persistent volume the upload folder is wiped on redeploy.
The database pod uses a persistent volume, so the data survives a restart.
Common mistake
Writing user uploads to the container's own disk. They vanish at the next deploy; use a volume or object storage.
Don't confuse with
Ephemeral storage, which is wiped when the container goes away.
Say it at work
- In a meeting or chat
Does this need a persistent volume?
- In an email or ticket
Back up the volume regularly.
Keep exploring
More in DevOps & Cloud