Skip to main content

CentOS Stream 10: Use External Storage with Podman

Mount host directories and Podman volumes into containers for persistent data storage beyond the container lifecycle.

May 25, 2026 4 min read
centoscentos-stream-10podmancontainersstoragevolumes

Mount external storage into containers to persist data beyond the container lifecycle.

Mount a Host Directory

Create a directory on the host and mount it into a container:

mkdir /var/lib/containers/disk01
echo "persistent storage" >> /var/lib/containers/disk01/testfile.txt

Run a container with the directory mounted on /mnt (add --privileged if SELinux is Enforcing):

podman run --privileged -it -v /var/lib/containers/disk01:/mnt centos:stream10 /bin/bash

Inside the container, verify the mount:

df -hT /mnt
cat /mnt/testfile.txt

Use Podman Volumes

Create a named volume:

podman volume create volume01

List and inspect volumes:

podman volume ls
podman volume inspect volume01

Mount the volume into a container:

podman run -it -v volume01:/mnt centos:stream10

Inside the container, write data to the volume:

echo "Podman Volume test" > /mnt/testfile.txt
exit

The data persists on the host at the volume mount point:

cat /var/lib/containers/storage/volumes/volume01/_data/testfile.txt

Mount the same volume into another container:

podman run -v volume01:/var/volume01 centos:stream10 /usr/bin/cat /var/volume01/testfile.txt

Remove a Volume

Remove containers using the volume first, then remove the volume:

podman rm [CONTAINER_ID]
podman volume rm volume01