New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support local volumes with a lifetime longer than that of the podman host #18075
Comments
You can set the volume_path in the containers.conf file to point to a shared network volume, that multiple nodes could use. Isn't that what you want. We also support volume plugins, which you could support remote volumes.
|
Setting the |
@mheon WDYT? |
I would suggest that this is what |
Thanks for sharing your thoughts. In my opinion, creating a tarball solely for "adding an entry to a database" seems unnecessary, especially when dealing with large volumes. Additionally, I prefer not to use nfs in this situation. |
It doesn't look like we can do bind mounts in |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
@samuel-f interested in opening a PR? |
@mheon do you think this is worth pursuing, or should we just add tests to make sure the current behavior survives. |
Sorry, I missed that. I don’t want to open a PR since I‘m not sure what exactly would have to be done |
The mount code (https://github.com/containers/podman/blob/main/libpod/volume_internal_common.go#L80-L119) for volumes needs to be adjusted to allow bind mounts in the |
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.
The text was updated successfully, but these errors were encountered: