containers/podman

Support local volumes with a lifetime longer than that of the podman host

Open

#18.075 geöffnet am 5. Apr. 2023

Auf GitHub ansehen
 (14 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (3.107 Forks)batch import
Good First Issue

Repository-Metriken

Stars
 (31.686 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Feature request description

Having the ability to retain volumes on a mounted filesystem is desirable as it allows for the replacement of the host system without losing the content of persistent volumes.

This is particularly useful when podman is used on a virtual machine with attached storage, where system upgrades involve replacing the virtual machine. While bind mounts or hostPath volumes could be used, managed volumes are more convenient, especially when podman-kube is already used to manage all other supported resources. Managed volumes offer the advantage of automated cleanup of volumes.

Suggest potential solution

As far as I can tell, the current behavior, although not guaranteed or documented, works as is with volume_path set to a directory on a mounted filesystem. Since podman does not modify the volume directory during volume creation, podman can be made aware of pre-existing volumes, simply by (re)creating volumes with the same name. However, to make it a reliable and supported feature, there may be additional changes required.

Have you considered any alternatives?

No response

Additional context

The behaviour was also mentioned in #16245, but with the opposite intention of using transient volumes.

Contributor Guide