-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Multiple volume paths. #24329
Comments
Note we are not podman-compose nor support it directly. So whatever syntax is used there is completely relevant here. I don't see why this would be needed over actual bind mounts? By the time you have to select a "path_label" you might as well just specify a full directory, no? |
Thank you for the response. I am sorry, I didn't realize Using volumes "just works" with podman
, whereas
gives a permission error. I am sure I can somehow make it work with bind mounts as well, but doesn't the argument of volumes' ease of use translate to this use case as well? I don't care about the directory outside the container; I just want it placed under some path prefix. Except I have two such prefixes. |
And I forgot the volume command I imagine:
|
you likely need to set
Well yes of course there is a use case but fundamentally I don't think it is strong enough given normal bind mounts already allow this even if it is bit longer to setup. But by the time we add path-label syntax it is properly not much longer. Overall I just think this adds extra complexity into podman that I do not wish to maintain but maybe other maintainers see it differently and like this. |
i agree with @Luap99 ... I wonder if the reporter should file an issue with containers/podman-compose ? |
Feature request description
Recently I added a new RAID to my server and want to migrate some volumes to it.
My project uses
podman-compose
with multiple volumes declared: some volumes are for caching only, others hold the database data.I want to migrate the database volumes to the RAID. Cache volumes can stay in the home directory because cache data is not critical and I don't want it to waste the RAID disks. The backing location of volumes is the only setting I am interested in changing, everything else should be managed by podman.
The current declaration is:
Suggest potential solution
Change the
volumes_path
setting to support a dictionary of labels to paths and then allow an option during volume creation to specify the path label the volume should use. One label (path) would be the default one, for example, the first one or explicitly declared as default.Then I could specify
Have you considered any alternatives?
Changing
volumes_path
would change all volume locations.Using bind mounts works, but I want podman to manage the volumes. No data is expected to be present in the location when the container starts and I don't need to interact with the volume as a directory outside the container.
Additional context
No response
The text was updated successfully, but these errors were encountered: