EX200 Manage containers Practice Question
Which TWO options to podman run can be used to persist data outside the container? (Select exactly two.)
⚠ Common exam trap
Red Hat often tests the distinction between ephemeral storage options like `--tmpfs` and persistent storage options like `--mount`/`-v`, and candidates mistakenly select `--tmpfs` thinking it persists data because it is writable, but it is memory-backed and lost on container stop.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
--mount
The `--mount` option (A) and `-v` (D) are both used to mount host directories or volumes into a container, allowing data to persist outside the container's writable layer. `--mount` provides a more explicit syntax for specifying mount type, source, and destination, while `-v` is a shorter alias for `--volume` that also binds host paths or named volumes. Both ensure data survives container removal.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
--mount
Why this is correct
--mount is a structured key=value flag, e.g., --mount type=bind,source=/data,target=/var/lib/data or type=volume,source=myvol,target=/var/lib/data. Unlike -v, it explicitly exposes the mount type and cleanly separates source and destination syntax. Because the mount points to a named volume or a host directory outside the container's writable layer, data is written to external storage and survives container deletion or re-creation.
- ✗
--read-only
Why it's wrong here
--read-only makes the container's root filesystem immutable, preventing any writes to the overlay or writable layer. It is a safety/security measure to stop containers from modifying their own image filesystem during runtime, not a mechanism to preserve or store data. Any data written would be rejected unless another writable mount is provided, so it does not and cannot persist data on its own.
- ✗
--tmpfs
Why it's wrong here
--tmpfs mounts an in-memory temporary filesystem, typically ram-backed, at a specified mount point in the container. The contents exist only for the life of the container process and are wiped completely when the container stops or is removed. It is useful for temporary, non-critical data that must be fast and non-persistent, but it does not provide any durable storage.
- ✓
-v
Why this is correct
-v (or --volume) is the classic shorthand for creating a bind mount or volume, e.g., -v mydata:/var/lib/db or -v /srv/data:/var/lib/db. The source can be a named Podman volume or a host directory; in either case, the container writes directly to external storage outside its ephemeral layer. Because that external storage is independent of the container lifecycle, data remains available after the container is removed, making -v a correct persistence option.
- ✗
--squash
Why it's wrong here
--squash is not a recognized option for podman run; it is a build-time flag used with podman build to flatten image layers. At runtime, podman run cannot squash layers or influence storage persistence, so the option is invalid for this command. Attempting to use --squash with podman run will produce an error, making it definitively wrong.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 427-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.