Podman has recently added support for named volumes, which is super handy.
As of today (2018-01-17), it supports the local
driver, which effectively
will bind-mount a tracked directory into one or more containers. It's helpful
to be able to limit the size of data volumes though so that one container
doesn't exhaust the resources of another.
Fortunately, the XFS filesystem let's us handle this natively using "project quotas". XFS allows setting quotas based on username, group, or project. The project quota effectively maps a project ID to a path on a filesystem.
By creating a quota on the path to the named volume, we can enforce quotas on volumes mounted into the container.
- Red Hat XFS Quota docs (redhat.com)
- Blog on XFS Project Quotas (scriptthe.net)