containers/podman

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

Open

#18.075 aperta il 5 apr 2023

Vedi su GitHub
 (14 commenti) (0 reazioni) (0 assegnatari)Go (3107 fork)batch import
Good First Issue

Metriche repository

Star
 (31.686 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor