Skip to Main Content

Containers, Cloud Native & Kubernetes

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

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
183 views