Skip to content

qm.container mounts /var/tmp as tmpfs #723

Open
@alexlarsson

Description

qm.container has ReadOnly=true, which maps to podman run --read-only.
This tells podman to mount the container image read-only, and then mount a tmpfs on top of /tmp, /run and /var/tmp.

However, in QM, /var/tmp is generally on top of the /var volume (which comes from /var/qm on the host), and we don't want this part to be a tmpfs, because that limits the size of /var/tmp files in the qm partition, and this is not expected (e.g. it is different than on what normally happens in rhel, where /tmp is ram and /var/tmp is disk based).

I think we need to pass some extra argument to manually configure /tmp and /run as tmpfs, with not special options for /var/tmp (so its just picked up from the volume).

I think what we want is
ReadOnly=true
ReadOnlyTmpfs=false
Mount=type=tmpfs,tmpfs-size=512M,destination=/tmp
Mount=type=tmpfs,tmpfs-size=512M,destination=/run

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions