-
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
set podman image storage location #1916
Comments
You can make a copy of /etc/containers/storage.conf in ~/.config/containers
(this directory may need to be created first) and configure where rootless
Podman stores things in that file. Be aware that, if you change these
directories, it's recommended that you delete the old ones (you may end up
with an unusable Podman otherwise).
It sounds like you'll want to change the graph root directory, where
permanent files and container images are stored. Start by changing graph
driver to the rootless default (vfs) and run root to a directory in
/run/user/$YOUR_UID/ (this directory does not need to exist, we'll create
it if it doesn't). Then set the graph root to a location where your user
has write access, and all container and image permanent files will be
stored at that location.
…On Sun, Dec 2, 2018, 07:40 Anatoli Babenia ***@***.*** wrote:
[//]: # *kind feature*
or, rather, *support request*.
My root is mounted at SSD for speed, and so does my home. However, I am
not rich, so SSD is small, and now I want more space. First I want to move
images to another disk, and if that won't help, move containers as well.
I found podman info, which printed some useful info at the end.
...
store:
ContainerStore:
number: 3
GraphDriverName: vfs
GraphOptions: []
GraphRoot: /home/anatoli/.local/share/containers/storage
GraphStatus: {}
ImageStore:
number: 1
RunRoot: /run/user/1000/run
The path /home/anatoli/.local/share/containers/storage is 6.3G, and there
is only one image 745Mb in size there.
✗ podman images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/golang 1.9.4 a6c306bd0b2f 8 months ago 754MB
✗ du -hs ~/.local/share/containers/storage
6.3G /home/anatoli/.local/share/containers/storage
I don't see how can I move images to the other place, because vfs-images
contains only meta information and vfs hosts only hash dirs.
6.3G /home/anatoli/.local/share/containers/storage/vfs
132K /home/anatoli/.local/share/containers/storage/vfs-containers
28K /home/anatoli/.local/share/containers/storage/vfs-images
1.8M /home/anatoli/.local/share/containers/storage/vfs-layers
*Is there a setting that I can change to store images in a separate dir?*
*Output of podman version:*
Version: 0.10.1.3
Go Version: go1.10.4
OS/Arch: linux/amd64
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1916>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHYHCKfbXbszilQURUZo7R-wUPFUP6a9ks5u08opgaJpZM4Y9Yi->
.
|
Sounds like |
We are moving over to creating the file by default, with the correct settings (so you'll only need to swap the one setting). That should be out in our next release (hopefully tomorrow). If you're looking for a way to just swap image storage, though, I don't think that's possible as of now - we storage images and containers in the same place as part of the architecture of containers/storage. We might be able to split that, but for now both must be in the same place. |
Let me know what should I do when it is released. I guess removing |
SImpler fix would be to setup a bind mount |
+1 for the file based configuration of the storage location. |
With podman 0.12.1.1 It should generate ~/.lcontig/containers/storage.conf |
|
|
It's not really clear from the generated file, but |
@mheon you're right that it's not clear... not sure if the generated |
It could, but it would be a fair bit of effort on our end (straight TOML generation to templated output). Probably worth it, though. |
Looks like Tom doesn't count comments as a feature - toml-lang/toml#284 |
@giuseppe I think your code is doing this, could you take a look. |
How often does |
You'd need to change both Migration is currently blocked by us validating the config file settings with the db. It should work if you start with a fresh storage |
If migration is impossible, then the only way is remove
, kill |
why do you need to remove podman and install it again? |
I believe this is no longer an issue. |
Not sure if anything wrong with my setup as of now I seems to hit this bug. The only way to make it work is using mount bind. as long as I have .config/containers/storage.conf with all correct settings podman always says: podman is in fedora 33,
the only thing it works by remove the custom config and then copy the storage over the other directory and empty the original one, mount bind two dir together. Should we re-open this issue? |
how does the |
The same situation, but tune in |
I have to remove it. But when I have issues described the content is as basic
|
Well, you have many solutions
|
Thanks, this saves my life! I don't have root permission on the machine. Solved the problem by using the following steps:
referenced this: #5412 |
My |
Check /usr/share/containers/storage.conf |
No such file |
Here is mine on Fedora. |
@giuseppe can you summarize the full process with docker support please? |
It is only storage.conf, you should never do anything with libpod.conf Remove it if you have on on your system. graphroot is used to change the system storage directories for images and containers. No need to update driver or runroot. |
Thanks @rhatdan |
If you want to copy your images from docker to podman, I was only advised this solution: #16020
I'm not sure for containers, but I guess, you could use something like
|
I would prefer this hack.
See
|
I had to create the config file: /home/user/.config/containers/storage.conf
The two commented lines were not needed to run rootless so far. |
[//]: # kind feature
or, rather, support request.
My root is mounted at SSD for speed, and so does my home. However, I am not rich, so SSD is small, and now I want more space. First I want to move images to another disk, and if that won't help, move containers as well.
I found
podman info
, which printed some useful info at the end.The path
/home/anatoli/.local/share/containers/storage
is 6.3G, and there is only one image 745Mb in size there.I don't see how can I move images to the other place, because
vfs-images
contains only meta information andvfs
hosts only hash dirs.Is there a setting that I can change to store images in a separate dir?
Output of
podman version
:The text was updated successfully, but these errors were encountered: