Question 97 of 527
Manage containershardMultiple SelectObjective-mapped

Quick Answer

The correct answer is that the :Z flag relabels the host directory with a container-specific SELinux context, and the -v bind mount persists data on the host filesystem after the container is removed. This works because SELinux enforces mandatory access controls by default, and without the :Z flag, the container process would be blocked from writing to /host/data due to a type mismatch. On the Red Hat Certified System Administrator EX200 exam, this concept tests your understanding of how Podman volume mounts interact with SELinux enforcing mode, a common scenario for containerized applications requiring persistent storage. A frequent trap is confusing the :Z flag with :z; remember that uppercase Z relabels the directory for a single container, while lowercase z shares the context among multiple containers. Memory tip: think of the capital Z as a "Zoo" where only one animal (container) gets the cage relabeled.

EX200 Manage containers Practice Question

This EX200 practice question tests your understanding of manage containers. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A containerized application requires persistent storage and must be able to run with SELinux enforcing. The administrator runs a container with the volume mount: `podman run -v /host/data:/container/data:Z myimage`. Which TWO statements are true about this configuration?

Question 1hardmulti select
Full question →

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

The volume mount persists after the container is removed.

Option C is correct because the `-v` flag with a bind mount persists the data in `/host/data` on the host filesystem even after the container is removed. The `:Z` flag tells Podman to relabel the host directory with a container-specific SELinux context, which is why Option E is also correct. This ensures the container can write to the mount point even when SELinux is enforcing.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The SELinux context of files in /host/data remains unchanged.

    Why it's wrong here

    :Z changes the context.

  • The /host/data directory is created automatically if it does not exist.

    Why it's wrong here

    Host directory must exist; podman does not create it.

  • The volume mount persists after the container is removed.

    Why this is correct

    Bind mounts persist independent of container lifecycle.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The container cannot write to /container/data if SELinux is enforcing.

    Why it's wrong here

    :Z allows writing by setting appropriate context.

  • Files in /host/data will be relabeled with a container-specific SELinux context.

    Why this is correct

    :Z relabels files for the container.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse the `:Z` (relabel for single container) and `:z` (relabel for shared use) flags, or assume SELinux enforcing always blocks writes, missing that the `:Z` flag explicitly enables write access by relabeling.

Detailed technical explanation

How to think about this question

The `:Z` flag triggers a recursive `chcon` (or `restorecon` equivalent) on the bind-mounted host directory, setting the SELinux context to `container_file_t` (or a per-container type) so the container's confined process can access it. This is distinct from `:z`, which shares the context among multiple containers. In Red Hat Enterprise Linux 8/9, Podman uses the `container_runtime_t` domain, and without proper labeling, SELinux would block writes with an AVC denial in `/var/log/audit/audit.log`.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the EX200 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Manage containers — This question tests Manage containers — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The volume mount persists after the container is removed. — Option C is correct because the `-v` flag with a bind mount persists the data in `/host/data` on the host filesystem even after the container is removed. The `:Z` flag tells Podman to relabel the host directory with a container-specific SELinux context, which is why Option E is also correct. This ensures the container can write to the mount point even when SELinux is enforcing.

What should I do if I get this EX200 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on EX200

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An administrator needs to ensure that a container always runs with a specific SELinux context for security reasons. The container uses a volume mount from the host. Which command should be used to start the container?

hard
  • A.podman run --label selinux_context=container_t -v /host/data:/data myimage
  • B.podman run --privileged -v /host/data:/data myimage
  • C.podman run --selinux-context container_t -v /host/data:/data myimage
  • D.podman run --security-opt label=type:container_t -v /host/data:/data myimage

Why D: Option D is correct because `--security-opt label=type:container_t` explicitly sets the SELinux type for the container process to `container_t`, ensuring the container runs with the required SELinux context. This is the proper way to assign a specific SELinux type when using `podman run`, especially when volume mounts are involved, as it avoids permission conflicts with the host's SELinux policy.

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.