Skip to Main Content

Containers, Cloud Native & Kubernetes

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to change primary container storage of podman?

William LaraFeb 28 2024

Oracle linux 9 server.

podman is using /var directory and filling root volume for running containers

I would like to change the storage location

I followed the steps below but they did not work

Please advise

=======================================================

Modify /etc/containers/storage.conf

# Primary Read/Write location of container storage

...

graphroot = "/var/lib/containers/storage" <== Change the path

When changing the graphroot location on an SELINUX system, you must ensure the labeling matches the default locations labels with the following commands.

Raw

# sudo semanage fcontext -a -e /var/lib/containers/storage /NEWSTORAGEPATH

# sudo restorecon -R -v /NEWSTORAGEPATH

Check the result.

Raw

# sudo podman info | grep storage

graphRoot: /var/lib/containers/storage

still pointing to /var file system

This post has been answered by William Lara on Mar 13 2024
Jump to Answer
Comments
Post Details
Added on Feb 28 2024
5 comments
2,051 views