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 · 5 comments

Comments

Projects
None yet
2 participants
@jpork
Copy link

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 label Feb 21, 2019

@mheon

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

commented Feb 21, 2019

#2397 should fix

@jpork

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator

commented Feb 26, 2019

Final fix should be in #2454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.