Skip to content
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

Change the graphroot in storage.conf doesn't effect volume creation #2395

Closed
jpork opened this issue Feb 21, 2019 · 6 comments · Fixed by #2397
Closed

Change the graphroot in storage.conf doesn't effect volume creation #2395

jpork opened this issue Feb 21, 2019 · 6 comments · Fixed by #2397
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@jpork
Copy link

jpork commented Feb 21, 2019

I've changed runroot and graphroot in /etc/containers/storage.conf
The new path is reflected in podman info and is used for image and container handling.

But new volumes created with podman volume create new-volume are placed in the default location:
/var/lib/containers/storage/new-volume/_data
I can see it with podman volume inspect new-volume and in the filesystem.

I've found no other hint how to change the base dir for volumes.

I run:

  • podman version 1.0.0
  • as root
  • on
    Operating System: Fedora 29 (Server Edition)
    CPE OS Name: cpe:/o:fedoraproject:fedora:29
    Kernel: Linux 4.20.5-200.fc29.x86_64
    Architecture: x86-64
@mheon mheon added the kind/bug Categorizes issue or PR as related to a bug. label Feb 21, 2019
@mheon
Copy link
Member

mheon commented Feb 21, 2019

There is an (undocumented, and not present in the default configuration) option volume_path in libpod.conf that controls the location of the volume path.

Fix here is to:

  1. Add that option to the default libpod.conf (commented out, but with a comment explaining its function)
  2. Add the option to the libpod.conf manpage
  3. Cause volume path to adjust by default when c/storage graph root is moved, as libpod's static dir does

@mheon mheon self-assigned this Feb 21, 2019
@mheon
Copy link
Member

mheon commented Feb 21, 2019

#2397 should fix

@jpork
Copy link
Author

jpork commented Feb 22, 2019

This is exactly what I'm looking for.

I've added

volume_path = "/srv/volumes"

to /usr/share/containers/libpod.conf

But it doesn't change the volume location so far. Its still in the default location /var/lib/containers/storage/...

@mheon
Copy link
Member

mheon commented Feb 26, 2019

We have a partial fix in #2397 that will ensure that volumes will always be a subdirectory of c/storage if the default storage directory moves.

Unfortunately, the volume_path option is still broken. I know what's wrong, but it will be a more substantial code change to fix, so we're going to hold it until after v1.1.0 is released

@mheon
Copy link
Member

mheon commented Feb 26, 2019

Final fix should be in #2454

@Bill0412
Copy link

After change the location, you may also need to podman system reset as mentioned in #7039.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants