containers/podman

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

Open

#18,075 建立於 2023年4月5日

在 GitHub 查看
 (14 留言) (0 反應) (0 負責人)Go (31,686 star) (3,107 fork)batch import
Good First Issue

描述

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.

貢獻者指南

Support local volumes with a lifetime longer than that of the podman host · containers/podman#18075 | Good First Issue