Page MenuHomeVyOS Platform

Containers switch to using overlay driver for podman storage
Closed, ResolvedPublicFEATURE REQUEST


Currently vyOs uses the vfs storage driver for podman storage, which is intended for testing purposes. We could use the much more space efficient overlay driver instead.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Performance optimization

Event Timeline

Viacheslav changed the subtype of this task from "Task" to "Feature Request".
Viacheslav renamed this task from Switch to using overlay driver for docker storage to Containers switch to using overlay driver for podman storage.Dec 9 2022, 7:20 PM

The "incompatibility" can be resolved by running the following script prior to upgrading to a new image:

# Migration helper script needed to be executed before upgrading to a more
# recent VyOS version as the container storage driver is changed incompatible

for pod in $(cli-shell-api listActiveNodes container name); do
    systemctl stop vyos-container-${pod//\'}.service

sed -i 's/vfs/overlay2/g' /etc/containers/storage.conf /usr/share/vyos/templates/container/storage.conf.j2
rm -rf /usr/lib/live/mount/persistence/container/storage/libpod

for pod in $(cli-shell-api listActiveNodes container name); do
    image=$(cli-shell-api returnActiveValue container name ${pod//\'} image)
    podman image pull $image
    systemctl start vyos-container-${pod//\'}.service

for dir in vfs vfs-containers vfs-images vfs-layers; do
    rm -rf /usr/lib/live/mount/persistence/container/storage/$dir
Viacheslav changed the task status from Open to Needs testing.Dec 24 2022, 12:59 PM

This manual step just got removed by f3956a5358a71 which simply exports active images as oci-image and re-imports the image after the filesystem got migrated. No manual interaction by the user required.

c-po claimed this task.