Courseiva

CCNA Storage And Configuration Questions

47 questions · Storage And Configuration topic · All types, answers revealed

1
Multi-Selecteasy

Which THREE commands are valid when inspecting or managing Podman storage volumes? (Choose THREE)

Select 3 answers
A.podman volume modify
B.podman volume inspect
C.podman volume rm
D.podman volume create
E.podman volume edit
AnswersB, C, D

`podman volume inspect` returns a volume's configuration as JSON, including its mountpoint, driver, and labels, satisfying the stem's requirement to inspect storage volumes. It queries volume metadata directly rather than container or image state, which is the axis distinguishing volume subcommands from other Podman inspection commands.

Why this answer

Option B, `podman volume inspect`, is correct because it is the standard subcommand for retrieving detailed JSON metadata about a named volume, including its mountpoint, driver, labels, and options. Option C, `podman volume rm`, is correct because it removes one or more volumes from Podman storage, optionally with `--force` to remove volumes in use. Option D, `podman volume create`, is correct because it is the canonical command for creating a new named volume, supporting flags such as `--driver`, `--label`, and `--opt`.

Option A, `podman volume modify`, is not a valid Podman subcommand (unlike `podman volume` operations such as `ls`, `prune`, or `exists`), and Option E, `podman volume edit`, also does not exist; Podman has no built-in volume editing command, so volume attributes must be changed by recreating the volume or using supported flags at creation time.

Exam trap

EX188 often tests the exact set of valid subcommands for Podman volume, so candidates must remember that modify and edit are not supported, while inspect, rm, and create are.

2
MCQmedium

An administrator needs to run a PostgreSQL container that stores its database files in a Podman named volume called pgdata, which was created earlier. The container must also have the volume mounted at /var/lib/postgresql/data inside the container. Which command should the administrator use?

A.podman run -d --name pg -v /var/lib/postgresql/data:pgdata -e POSTGRES_PASSWORD=secret postgres:15
B.podman run -d --name pg --volume pgdata:/var/lib/postgresql/data:ro -e POSTGRES_PASSWORD=secret postgres:15
C.podman run -d --name pg -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=secret postgres:15
D.podman run -d --name pg --mount type=bind,source=pgdata,destination=/var/lib/postgresql/data -e POSTGRES_PASSWORD=secret postgres:15
AnswerC

This command correctly uses the short -v syntax to mount the named volume pgdata at the container path /var/lib/postgresql/data. The volume name is specified before the colon, and the container path after, which is the standard format for named volumes in Podman. The environment variable sets the database password. This is the simplest and most common way to attach a named volume to a container.

Why this answer

The correct command uses the -v flag to mount the named volume pgdata at the container path /var/lib/postgresql/data. Named volumes are referenced by name, and the short syntax source:destination is the standard way to attach them. The other options either reverse the order, use the wrong mount type, or add a read-only restriction that breaks database functionality.

Exam trap

The trap here is confusing the order of source and destination in the -v flag, where the volume name must precede the container path.

3
MCQeasy

Which subcommand deletes one or more specific named volumes?

A.podman volume drop
B.podman volume rm
C.podman volume delete
D.podman rm volume
AnswerB

podman volume rm removes one or more named volumes by passing their names as arguments, directly satisfying the requirement to delete specific volumes. Other volume subcommands create, inspect or prune volumes, but only rm targets named volumes for deletion.

Why this answer

The correct subcommand to delete one or more named volumes is podman volume rm. This command removes the specified volumes from the system.

Exam trap

EX188 often tests the exact subcommand names, so candidates must remember that 'rm' is used for removing volumes, not 'delete' or 'drop'.

How to eliminate wrong answers

Option A is wrong because podman volume drop is not a valid subcommand. Option C is wrong because podman volume delete is not a valid subcommand; Podman uses rm. Option D is wrong because podman rm volume is not a valid command; rm is used for containers, not volumes.

4
MCQhard

You need to pass sensitive database credentials to a Podman container securely without storing them in plaintext environment variables. Which sequence of commands correctly creates and injects the secret?

A.podman volume create db_pass && podman run --volume db_pass:/run/secrets/pass myapp
B.podman secret create db_pass secret.txt && podman run --env-file secret.txt myapp
C.podman secret create db_pass secret.txt && podman run --secret db_pass,type=mount,target=/run/secrets/pass myapp
D.podman secret add db_pass secret.txt && podman run -e SECRET=db_pass myapp
AnswerC

Podman secrets store credentials encrypted at rest and inject them as tmpfs-mounted files, never as environment variables. The `type=mount` flag writes the secret to `/run/secrets/pass` inside the container, satisfying the requirement to avoid plaintext environment variables while keeping credentials readable only within the container's memory-backed filesystem.

Why this answer

Podman secrets are created with 'podman secret create' and injected into a container using '--secret'. Specifying type=mount and target=/run/secrets/pass mounts the secret as a file inside the container, avoiding plaintext environment variables. This is the secure, supported pattern for delivering credentials to a container.

Exam trap

EX188 often tests whether candidates know the correct Podman secret subcommand is 'create' and that secure injection uses --secret with type=mount rather than environment variables.

How to eliminate wrong answers

Option A is wrong because a volume is not a secret mechanism — it stores data on disk and does not provide the access controls or tmpfs-backed delivery of Podman secrets. Option B is wrong because --env-file reads plaintext environment variables from a file, which is exactly the insecure pattern the question says to avoid. Option D is wrong because 'podman secret add' is not a valid subcommand (it is 'create'), and passing -e SECRET=db_pass only passes the secret's name, not its value.

5
MCQmedium

You are configuring a container to consume a Podman secret named db_password. By default, where within the container's file system will this secret be mounted if no destination path is specified?

A./secrets/db_password
B./etc/secrets/db_password
C./run/secrets/db_password
D./var/run/secrets/db_password
AnswerC

Podman mounts secrets under /run/secrets by default, using the secret's name as the filename, so db_password appears at /run/secrets/db_password without any destination flag. This satisfies the stem's constraint of specifying no target path, unlike /etc or /var locations that require explicit configuration.

Why this answer

When a Podman secret is consumed without an explicit destination, Podman mounts it at /run/secrets/<secret-name> inside the container. This mirrors the Docker Swarm convention and uses /run because it is a tmpfs-backed runtime directory, keeping the secret out of the image layers and off persistent storage. Thus db_password appears at /run/secrets/db_password.

Exam trap

EX188 often tests the exact default mount path for secrets, and candidates confuse the Docker Swarm-style /run/secrets with the older /var/run/secrets path or invent /etc/secrets.

How to eliminate wrong answers

Option A is wrong because /secrets is not a Podman default path — it is a user-invented directory that would only exist if explicitly mounted. Option B is wrong because /etc/secrets is not used by Podman; /etc is for persistent config and would defeat the purpose of an ephemeral secret mount. Option D is wrong because although /var/run is traditionally a symlink to /run on RHEL, Podman's documented default is the canonical /run/secrets path, not /var/run/secrets.

6
MCQhard

An application requires a secret to be exposed as an environment variable inside the container instead of a file mount. Which option achieves this with '--secret'?

A.podman run --secret db_pwd,type=env myapp
B.podman run --secret db_pwd,destination=env myapp
C.podman run --secret db_pwd,target=variable myapp
D.podman run --secret db_pwd,mode=environment myapp
AnswerA

The type=env parameter on --secret injects the secret's value directly as an environment variable inside the container rather than mounting it as a file under /run/secrets. This matches the application's requirement for environment-variable exposure using Podman's native secret handling.

Why this answer

Podman's --secret flag supports a type= option, and type=env exposes the secret as an environment variable inside the container rather than mounting it as a file under /run/secrets. The syntax --secret db_pwd,type=env is the documented form for this behavior. This is useful for applications that read credentials from environment variables (e.g., 12-factor apps) instead of files.

Exam trap

EX188 often tests the distinction between file-mounted secrets (default) and environment-variable secrets (type=env), and candidates confuse the --secret type= key with volume/mount keys like destination, target, or mode.

How to eliminate wrong answers

Option B is wrong because destination= is not a valid key for --secret; destination is used with --mount for volumes, not secrets. Option C is wrong because target= is a mount option (used with --mount type=bind or tmpfs) and is not recognized by --secret. Option D is wrong because mode= controls file permissions (e.g., mode=0400) on the mounted secret file, not whether the secret is exposed as an environment variable.

7
MCQmedium

An engineer needs to mount a host directory using the advanced '--mount' syntax instead of '-v'. Which syntax correctly specifies a bind mount?

A.podman run --mount /host/path:/container/path:bind myapp
B.podman run --mount source=/host/path,target=/container/path myapp
C.podman run --mount bind:/host/path:/container/path myapp
D.podman run --mount type=bind,source=/host/path,destination=/container/path myapp
AnswerD

The `--mount` flag requires explicit key-value pairs, so `type=bind` declares a bind mount rather than a named volume or tmpfs. `source` and `destination` map the host directory to the container path, satisfying the stem's demand for correct advanced syntax. The comma-separated form is parsed without ambiguity, unlike `-v` shorthand.

Why this answer

The advanced --mount syntax uses comma-separated key=value pairs, and for a bind mount you must specify type=bind, source=<host path>, destination=<container path>. Option D is the only one that follows this exact syntax.

Exam trap

EX188 often tests the syntax difference between -v (colon-separated) and --mount (key=value) — candidates mix the two and forget that --mount requires an explicit type= parameter.

How to eliminate wrong answers

Option A is wrong because it uses colon-separated positional syntax (the -v style) with --mount, which --mount does not accept. Option B is wrong because it omits type=bind, so Podman cannot determine the mount type. Option C is wrong because it uses 'bind:/host/path:/container/path', which is not valid --mount syntax — the type must be a key=value pair, not a positional prefix.

8
Multi-Selecthard

Which TWO options can be specified when mounting a Podman secret into a container? (Choose TWO)

Select 2 answers
A.type=env
B.type=volume
C.type=tmpfs
D.type=mount
E.type=bind
AnswersA, D

type=env injects the secret's value directly into the container as an environment variable, readable by processes via standard environment lookups. This satisfies the scenario's requirement for a valid Podman secret mounting option, though environment variables are more readily exposed through process inspection than file-mounted secrets.

Why this answer

Option A (type=env) is correct because Podman secrets support being exposed to a container as environment variables, which is selected with the type=env mount option (e.g., podman run --secret mysecret,type=env). Option D (type=mount) is correct because the default and explicitly supported way to inject a secret is as a file mounted into the container's filesystem, specified with type=mount (e.g., --secret mysecret,type=mount). The remaining options do not belong: type=volume, type=tmpfs, and type=bind are not valid secret type values for Podman secrets — tmpfs and bind are storage/mount concepts used elsewhere (e.g., --mount type=tmpfs or type=bind), and volume is a storage driver concept, none of which are accepted as the secret type parameter.

Exam trap

EX188 often tests whether candidates confuse Podman secret types (mount, env) with unrelated storage concepts like volume, tmpfs, or bind — the exam expects you to know that only mount and env are valid for --secret.

9
MCQmedium

An administrator wants to create a named volume using a specific volume driver instead of the default local driver. Which flag should be used with 'podman volume create'?

A.podman volume create --driver nfs my_vol
B.podman volume create --storage-driver nfs my_vol
C.podman volume create --plugin nfs my_vol
D.podman volume create -t nfs my_vol
AnswerA

The --driver flag specifies which volume driver Podman uses when creating the volume, overriding the default local driver. Naming nfs here instructs Podman to provision the volume through the NFS driver plugin, matching the requirement for a non-default driver.

Why this answer

'podman volume create --driver nfs my_vol' correctly specifies the volume driver using the '--driver' flag. Podman supports pluggable volume drivers, and '--driver' is the documented option to select a non-default driver such as nfs, glusterfs, or a custom plugin.

Exam trap

EX188 often tests the distinction between '--driver' (volume driver) and '--storage-driver' (container storage backend) — candidates conflate the two because both contain the word 'driver'.

How to eliminate wrong answers

Option B is wrong because '--storage-driver' is a global Podman option that selects the container storage backend (overlay, vfs, btrfs), not a volume driver — using it with 'volume create' is invalid. Option C is wrong because '--plugin' is not a recognized flag for 'podman volume create'; volume drivers are specified via '--driver'. Option D is wrong because '-t' is not a valid shorthand for driver selection in this context (it is used elsewhere for types, e.g., in 'podman network create -d'), and it would not set the volume driver.

10
Multi-Selecteasy

Which TWO flags can be used to mount volumes or bind mounts when running a container? (Choose TWO)

Select 2 answers
A.--mount
B.-v or --volume
C.--store-path
D.--attach-storage
E.--link-volume
AnswersA, B

The --mount flag attaches volumes or bind mounts to a container, accepting key-value parameters such as type, source, and destination. It satisfies the stem's requirement for mounting storage at container runtime, and is the modern, more explicit alternative to the legacy --volume flag.

Why this answer

Option A (--mount) is correct because it is the modern, explicit Docker flag for attaching volumes, bind mounts, and tmpfs mounts, using comma-separated key=value pairs such as type=bind,source=/host/path,target=/container/path. Option B (-v or --volume) is correct because it is the classic Docker shorthand for the same purpose, using the colon-separated syntax source:target[:options], and it remains fully supported for both named volumes and bind mounts. The unmarked options do not belong: --store-path is not a Docker run flag (it relates to storage configuration concepts, not container mounting), --attach-storage is not a valid Docker CLI option, and --link-volume is not a recognized Docker flag for attaching volumes or bind mounts.

Exam trap

EX188 often tests the difference between valid Docker flags and plausible-sounding but non-existent options, so candidates must remember that only --mount and -v/--volume are correct for mounting volumes.

11
MCQhard

An administrator is troubleshooting a rootless Podman container that fails to write to a bind-mounted host directory. The directory is owned by the user on the host, but inside the container, the process runs as UID 1000 and receives permission denied. Which action should the administrator take to resolve the issue?

A.Change the container's user to root by adding --user root to the podman run command.
B.Add the :Z option to the mount to relabel the directory for SELinux.
C.Run the container with --privileged to bypass user namespace restrictions.
D.Use the :U mount option to recursively change ownership of the host directory to match the container's user namespace mapping.
AnswerD

The :U option tells Podman to adjust the ownership of the host directory so that it matches the UID/GID mapping inside the container. In rootless mode, the container's UID 1000 corresponds to a different host UID (often in the high range) due to user namespace remapping. Using :U ensures the container process has write access by changing the host directory's ownership to the mapped UID. This is the recommended solution for permission issues with bind mounts in rootless containers.

Why this answer

The root cause is the UID mapping between the container and the host in rootless mode. The :U mount option adjusts the host directory's ownership to match the container's user namespace, granting the necessary write permissions. The other options either do not address the ownership mismatch or introduce unnecessary security risks.

Exam trap

The trap here is assuming that running the container as root will grant host root privileges, but in rootless mode, root inside the container is mapped to the unprivileged host user.

12
Multi-Selecthard

Which TWO methods can be used to supply environment variables to a Podman container? (Choose TWO)

Select 2 answers
A.Using the --environment-map flag
B.Using the --var-file flag
C.Using the -e or --env flag
D.Using the --inject-env flag
E.Using the --env-file flag
AnswersC, E

The -e or --env flag passes a single variable directly on the podman run command line, setting it inside the container at launch. This satisfies the requirement to supply environment variables without needing an external file, ideal for quick, ad-hoc values.

Why this answer

Option C is correct because Podman supports the -e or --env flag to pass individual environment variables directly on the command line, e.g. podman run -e MYVAR=value image, which sets the variable inside the container. Option E is correct because the --env-file flag lets you supply a file containing KEY=value lines that Podman reads and injects as environment variables into the container. The other options are not valid Podman flags: --environment-map (A), --var-file (B), and --inject-env (D) do not exist in Podman's CLI, so they cannot be used to supply environment variables.

Exam trap

EX188 often tests the distinction between valid Podman flags and plausible-sounding but non-existent options like --environment-map or --inject-env, causing candidates to guess based on Docker or other tool familiarity.

13
MCQmedium

A developer wants to mount a host directory into a container with read-only permissions to prevent accidental data modification. Which volume option flag achieves this?

A.podman run --read-only-mount=/host/data
B.podman run -v /host/data:/container/data:ro
C.podman run -v /host/data:/container/data:rw
D.podman run --mount type=bind,source=/host/data,destination=/container/data,readonly=false
AnswerB

The `:ro` suffix on the `-v` bind mount sets the mount's read-only attribute in the kernel, so writes to `/container/data` fail with EROFS. This directly satisfies the stem's constraint of preventing accidental modification of the host directory, while still exposing its contents to the container.

Why this answer

The -v /host/data:/container/data:ro syntax mounts the host directory with read-only permissions inside the container. The :ro suffix tells the runtime to mount the bind read-only, preventing any writes from the container to the host path. This is the standard short-form volume option for read-only bind mounts.

Exam trap

EX188 often tests the exact placement and spelling of the :ro option, and candidates confuse it with the nonexistent --read-only-mount flag or with readonly=false in the long-form syntax.

How to eliminate wrong answers

Option A is wrong because --read-only-mount is not a valid podman flag; there is no such option. Option C is wrong because :rw explicitly grants read-write access, the opposite of what is required. Option D is wrong because readonly=false explicitly disables read-only mode, and the --mount syntax uses readonly (or ro) as a boolean flag, not readonly=false for read-only.

14
MCQeasy

An administrator needs to pass a configuration file located at /etc/myapp/config.yml on the host into a container at the same path. The container should read the file but not modify it. Which Podman run option accomplishes this with minimal risk of accidental modification?

A.podman run -v /etc/myapp:/etc/myapp:ro myapp:latest
B.podman run --mount type=bind,source=/etc/myapp/config.yml,target=/etc/myapp/config.yml myapp:latest
C.podman run --volume /etc/myapp/config.yml:/etc/myapp/config.yml:rw myapp:latest
D.podman run -v /etc/myapp/config.yml:/etc/myapp/config.yml:ro myapp:latest
AnswerD

The :ro option mounts the file as read-only inside the container, preventing any writes. This directly meets the requirement to read but not modify, and it uses a bind mount to map the specific host file. It is the correct and safe choice.

Why this answer

Using -v with :ro mounts the specific host file as read-only inside the container, satisfying the read-only requirement. The other options either allow write access, mount a directory instead of a file, or omit read-only protection. The :ro flag is essential to prevent accidental modification.

Exam trap

The trap here is overlooking the :ro flag and assuming any bind mount is read-only by default, but bind mounts are read-write unless explicitly specified otherwise.

15
MCQeasy

What type of storage pattern is used by default when a container writes logs and temporary application state directly to its writable layer without any volumes attached?

A.Persistent named storage
B.Ephemeral container storage
C.Bind mount storage
D.Block storage replication
AnswerB

The writable layer sits atop the container's image and is destroyed with the container, so logs and temporary state written there vanish on restart. This is ephemeral container storage, the default pattern absent any mounted volume.

Why this answer

When a container writes logs or temporary state to its writable layer without any volume attached, that data is stored in the container's ephemeral writable layer. This storage is tied to the container's lifecycle and is lost when the container is removed, making it ephemeral. It is not persistent, not a bind mount, and not replicated block storage.

Exam trap

EX188 often tests the misconception that container writable layers are persistent, confusing them with volumes or bind mounts.

How to eliminate wrong answers

Option A is wrong because persistent named storage refers to named volumes that survive container removal, which is not the case here. Option C is wrong because bind mount storage refers to mounting a host directory into the container, which is explicitly not happening. Option D is wrong because block storage replication is a storage infrastructure concept unrelated to a container's writable layer.

16
Multi-Selectmedium

Which TWO statements are true regarding Podman bind mounts? (Choose TWO)

Select 2 answers
A.They are automatically deleted when the container is removed
B.They cannot be mounted in read-only mode
C.They are managed entirely inside Podman's internal volume database without host paths
D.They link a specific host path directly into the container filesystem
E.Host file permissions and SELinux contexts directly impact container access
AnswersD, E

A bind mount maps an existing absolute host path, such as /home/user/data, straight into the container's filesystem namespace, rather than creating an isolated volume. This satisfies the stem's requirement of linking a specific host path directly into the container filesystem.

Why this answer

Option D is correct because a Podman bind mount maps an explicit host directory or file path directly into a container path (e.g., -v /host/dir:/container/dir), unlike named volumes that Podman manages under its storage root. Option E is correct because bind mounts expose the host filesystem's ownership, mode bits, and SELinux labels to the container, so permission denials or SELinux AVC denials on the host path directly affect container access (often requiring :z/:Z relabeling or correct UID/GID mapping). Option A is wrong because bind mounts are host paths that persist after the container is removed; only anonymous volumes may be cleaned up.

Option B is wrong because bind mounts can be mounted read-only using the :ro (or :ro,Z) mount option. Option C is wrong because that describes Podman-managed named volumes stored in Podman's volume database, not bind mounts, which reference host paths directly.

Exam trap

EX188 often tests the distinction between bind mounts (host-path-referenced, permission/SELinux-sensitive, persistent) and named volumes (Podman-managed, stored in the volume database) — candidates who conflate the two pick options describing volume behavior for bind mounts.

17
MCQeasy

Where are Podman named volumes typically stored on the host file system by default for a non-root user?

A./var/lib/containers/storage/volumes/
B./etc/containers/volumes/
C./var/run/containers/storage/
D.~/.local/share/containers/storage/volumes/
AnswerD

For a non-root user, Podman stores named volumes under the user's home directory because rootless containers cannot write to `/var/lib/containers`. The default rootless storage path is `~/.local/share/containers/storage`, with named volumes placed in its `volumes/` subdirectory, satisfying the non-root constraint in the stem.

Why this answer

For a non-root user, Podman stores named volumes under the user's home directory in ~/.local/share/containers/storage/volumes/ by default. This is because rootless Podman uses a separate storage location for each user, following the XDG Base Directory specification. The root user's volumes are stored in /var/lib/containers/storage/volumes/, but non-root users do not have write access there, so Podman uses the user-specific path.

Exam trap

EX188 often tests the distinction between rootful and rootless Podman storage paths, and candidates may incorrectly assume that all volumes are stored in /var/lib/containers/storage/volumes/ regardless of user context.

How to eliminate wrong answers

Option A is wrong because /var/lib/containers/storage/volumes/ is the default storage location for rootful Podman (when running as root), not for a non-root user. Option B is wrong because /etc/containers/volumes/ is not a standard Podman storage path; /etc/containers/ typically holds configuration files like registries.conf and policy.json, not volume data. Option C is wrong because /var/run/containers/storage/ is used for runtime state (e.g., temporary sockets and PID files) and is cleared on reboot, not for persistent volume storage.

18
Multi-Selectmedium

Which TWO actions occur when a container is run with ephemeral storage (the default behavior without volume mounts)? (Choose TWO)

Select 2 answers
A.All container changes are written directly back to the read-only image layer
B.The container has its own writable scratchpad layer separate from the image
C.Data persists automatically across host reboots and container deletions
D.Data written to the container layer is lost when the container is removed
E.Host files are automatically synchronized into the container storage
AnswersB, D

A container image's layers are read-only, so any writes at runtime go to a thin writable layer created on top of the image. This copy-on-write scratchpad is unique to each container instance and persists only for that container's lifetime.

Why this answer

Option B is correct because when a container runs without any volume mounts, Docker (or a similar container runtime) creates a writable container layer on top of the read-only image layers, using a copy-on-write union filesystem such as overlay2; this scratchpad layer is where all runtime changes (new files, modified files, deleted files) are stored, keeping the underlying image immutable. Option D is correct because that writable layer is tied to the container's lifecycle: when the container is removed with docker rm (or docker run --rm), the layer and all data written to it are deleted, which is why ephemeral storage does not persist. Option A is wrong because image layers are read-only and are never written back to; changes go to the separate writable layer via copy-on-write.

Option C is wrong because ephemeral container-layer data does not survive container deletion or host reboots unless a volume or bind mount is used. Option E is wrong because host files are not automatically synchronized into container storage; host access requires an explicit bind mount or volume.

Exam trap

EX188 often tests whether candidates mistakenly believe container writes go back into the image or persist automatically, confusing ephemeral container layers with volume-backed persistence.

19
MCQmedium

An administrator wants to create a named volume called appdata and inspect its mount point on the host. Which sequence of commands should the administrator use?

A.podman volume add appdata then podman volume show appdata
B.podman volume create appdata then podman volume inspect appdata
C.podman volume new appdata then podman volume details appdata
D.podman create volume appdata then podman inspect volume appdata
AnswerB

The podman volume create command creates a named volume, and podman volume inspect displays detailed information about it, including the mount point on the host. This is the correct sequence to both create the volume and find its location. The inspect output includes fields such as Mountpoint, which shows where the data is stored on the host filesystem.

Why this answer

To create a named volume and inspect its host mount point, the administrator should use podman volume create followed by podman volume inspect. These are the correct subcommands for volume management in Podman. The other options use invalid command syntax that would not work.

Exam trap

The trap here is mixing up the order of 'volume' and 'create', as in podman create volume, which is invalid.

20
Multi-Selectmedium

Which TWO actions can be performed using the podman volume management command suite? (Choose two.)

Select 2 answers
A.Modify the size limit of an existing volume using podman volume resize
B.Display detailed low-level configuration of a volume using podman volume inspect
C.Encrypt a managed volume at rest using podman volume encrypt
D.Convert a bind mount to a named volume using podman volume convert
E.Remove all unused volumes using podman volume prune
AnswersB, E

podman volume inspect returns the volume's full low-level configuration, including mountpoint, driver, labels and options, in JSON form. This directly satisfies the stem's requirement for displaying detailed configuration, a capability unique to the inspect subcommand within the volume suite.

Why this answer

Option B is correct because `podman volume inspect` is a real subcommand of the `podman volume` suite that outputs detailed low-level JSON configuration for a named volume, including its mountpoint, driver, labels, and options. Option E is correct because `podman volume prune` is a valid subcommand that removes all volumes not currently referenced by any container, freeing unused storage. Option A is incorrect because there is no `podman volume resize` subcommand; volume size limits are not managed that way in Podman.

Option C is incorrect because `podman volume encrypt` does not exist; Podman does not provide a volume-encryption subcommand in its volume suite. Option D is incorrect because `podman volume convert` is not a real subcommand and bind mounts cannot be converted into named volumes via the volume management suite.

Exam trap

EX188 often tests command existence and syntax; candidates may assume commands like `resize` or `encrypt` exist because other container tools have them, but Podman's volume suite is limited.

21
MCQhard

An engineer needs to inspect the low-level configuration details, mount points, and driver options of a named volume named 'app_vol'. Which command provides this information in JSON format?

A.podman volume inspect app_vol
B.podman volume show app_vol
C.podman volume status app_vol
D.podman inspect volume app_vol
AnswerA

`podman volume inspect app_vol` returns the volume's full configuration as a JSON array, exposing Mountpoint, Driver, Options, Labels and Scope. This directly satisfies the stem's requirement for low-level mount point and driver detail in JSON, unlike `podman volume ls`, which lists names only.

Why this answer

'podman volume inspect app_vol' returns detailed JSON output including the volume's mount point, driver, labels, and options. This is the canonical command for retrieving low-level volume metadata in a machine-readable format.

Exam trap

The trap here is the reversed syntax 'podman inspect volume <name>' — candidates familiar with Docker's 'docker volume inspect' sometimes transpose the words, but Podman requires the resource type immediately after 'podman'.

How to eliminate wrong answers

Option B is wrong because 'podman volume show' is not a valid Podman subcommand — there is no 'show' verb under 'podman volume'. Option C is wrong because 'podman volume status' does not exist; status information is obtained via 'inspect' or 'ls'. Option D is wrong because the correct syntax is 'podman volume inspect <name>', not 'podman inspect volume <name>' — the latter would attempt to inspect a container or image literally named 'volume'.

22
MCQmedium

An application container requires multiple configuration variables defined in a local file named 'app.env'. Which flag loads these variables into the container environment?

A.podman run --env-file app.env myapp
B.podman run --config-file app.env myapp
C.podman run -e @app.env myapp
D.podman run --load-env app.env myapp
AnswerA

The --env-file flag reads the named local file and injects each KEY=VALUE pair as environment variables inside the container, so app.env's multiple configuration variables become available to the application at runtime without manual --env entries.

Why this answer

The --env-file flag is used with podman run to load environment variables from a file. The file should contain lines in the format VAR=value. This allows multiple variables to be set in the container environment without specifying each with -e.

Exam trap

EX188 often tests the correct flag for loading environment variables from a file, and candidates may confuse --env-file with other flags like --config-file or invalid syntax.

How to eliminate wrong answers

Option B is wrong because --config-file is not a valid podman run flag; podman uses --env-file for environment variables. Option C is wrong because -e @app.env is not valid syntax; the -e flag expects a single variable assignment, and the @ symbol is not used to read from a file. Option D is wrong because --load-env is not a valid podman run flag.

23
MCQeasy

Which command displays disk space usage statistics for Podman storage, including volumes and containers?

A.podman system df
B.podman disk status
C.podman volume df
D.podman storage usage
AnswerA

`podman system df` reports disk usage across Podman's storage, listing images, containers and volumes with total, active and reclaimable space. It directly satisfies the stem's requirement to display disk space statistics covering volumes and containers.

Why this answer

The correct command is `podman system df`. This command provides a summary of disk space usage for Podman's storage, including images, containers, and volumes. It is analogous to `docker system df` and is the standard way to inspect storage consumption in Podman.

Exam trap

EX188 often tests the confusion between Docker and Podman command syntax, leading candidates to assume `podman disk` or `podman storage` subcommands exist when they do not.

How to eliminate wrong answers

Option B is wrong because `podman disk status` is not a valid Podman subcommand; Podman does not have a `disk` command group. Option C is wrong because `podman volume df` is not a valid command; while `podman volume` exists, it does not have a `df` subcommand. Option D is wrong because `podman storage usage` is not a valid command; Podman's storage-related commands are under `podman system` (e.g., `podman system df`).

24
Multi-Selecthard

When configuring container mounts using the --mount flag, which THREE key-value pairs are valid parameters in the option string? (Choose three.)

Select 3 answers
A.destination
B.source
C.permission
D.owner
E.type
AnswersA, B, E

The `destination` key-value pair sets the container-side mount path, satisfying the requirement that `--mount` accepts explicit target parameters. Unlike `--volume`, which uses positional arguments, `--mount` requires named keys such as `destination` (or its alias `target`) to define where the volume appears inside the container.

Why this answer

The --mount flag accepts a comma-separated list of key=value pairs, and the three valid keys among the choices are type, source, and destination. Option E (type) is correct because it specifies the mount type, such as type=bind, type=volume, or type=tmpfs, which determines how the mount is handled. Option B (source) is correct because it identifies the source of the mount, such as a host path for a bind mount or a named volume for a volume mount.

Option A (destination) is correct because it sets the path inside the container where the filesystem is mounted, for example destination=/app/data. Option C (permission) is not a valid --mount key; read/write control is expressed with the read-only or ro key (or --read-only), not permission. Option D (owner) is also not a valid --mount key, since ownership is determined by the underlying filesystem and container user, not by a mount option string parameter.

Exam trap

EX188 often tests the exact key names accepted by --mount, and candidates confuse the 'ro'/'rw' option (a value, not a key) with a nonexistent 'permission' key.

25
MCQeasy

How can an administrator remove an existing Podman secret named 'old_secret'?

A.podman rm secret old_secret
B.podman secret rm old_secret
C.podman secret delete old_secret
D.podman secret remove old_secret
AnswerB

The podman secret rm subcommand deletes the named secret from Podman's secret store, removing it so containers can no longer reference it. The syntax matches the resource type followed by the verb and the secret's name.

Why this answer

The correct Podman command to remove a secret is 'podman secret rm <name>'. Podman's secret subcommand follows the same verb pattern as other resource subcommands (rm for remove), so 'podman secret rm old_secret' deletes the named secret from Podman's secret store.

Exam trap

EX188 often tests whether candidates assume Docker-style or generic verbs like 'delete' or 'remove' work in Podman — the exam expects knowledge that Podman standardizes on 'rm' across all resource subcommands.

How to eliminate wrong answers

Option A is wrong because 'podman rm secret old_secret' uses the container-removal command 'podman rm' with 'secret' as a container name, which will fail — podman rm only removes containers. Option C is wrong because 'delete' is not a valid Podman subcommand verb; Podman uses 'rm' consistently. Option D is wrong because 'remove' is not a valid Podman subcommand verb either, even though it is the English expansion of 'rm'.

26
MCQhard

An administrator needs to list all created Podman secrets on the system. Which command should they execute?

A.podman secret list
B.podman secret ls
C.podman secrets ls
D.podman system secrets
AnswerB

`podman secret ls` queries the local Podman secret store and returns every created secret, satisfying the requirement to list all secrets on the system. Unlike `podman secret inspect`, which requires a named secret, `ls` enumerates them without arguments, matching the administrator's need for a complete inventory.

Why this answer

The correct command to list all created Podman secrets is `podman secret ls`. Podman follows the same subcommand naming conventions as Docker, where `ls` is the standard alias for listing resources. The `podman secret` command group includes `create`, `inspect`, `ls`, and `rm`, so `podman secret ls` is the valid syntax to display all secrets stored in the system.

Exam trap

EX188 often tests the exact syntax of Podman subcommands, and candidates may confuse `list` with `ls` or use the plural `secrets` instead of the singular `secret`, leading to command failures.

How to eliminate wrong answers

Option A is wrong because `podman secret list` is not a valid subcommand; Podman uses `ls` (not `list`) for listing secrets, unlike some other tools that accept both. Option C is wrong because the subcommand group is `secret` (singular), not `secrets` (plural); using the plural form results in an unrecognized command error. Option D is wrong because `podman system secrets` does not exist; `podman system` manages system-level information like `df`, `info`, and `prune`, but not secrets.

27
MCQmedium

An administrator needs to pass a single environment variable directly on the command line when starting a container. Which flag accomplishes this?

A.podman run -e DB_HOST=localhost myapp
B.podman run --set-env DB_HOST=localhost myapp
C.podman run -v DB_HOST=localhost myapp
D.podman run --variable DB_HOST=localhost myapp
AnswerA

The -e flag passes a single environment variable into the container at runtime, setting DB_HOST to localhost for the myapp process. This satisfies the requirement to inject one variable directly on the command line rather than through an env file.

Why this answer

The -e flag (or --env) in podman run sets an environment variable inside the container. The syntax podman run -e DB_HOST=localhost myapp passes DB_HOST=localhost to the container's environment. This is the standard and correct way to inject a single environment variable on the command line.

Exam trap

The trap is confusing flags: -v is for volumes, -e is for environment variables; candidates might also invent flags like --set-env or --variable, which do not exist.

How to eliminate wrong answers

Option B is wrong because --set-env is not a valid Podman flag; the correct flag is --env or -e. Option C is wrong because -v is used for volume mounts (e.g., -v /host:/container), not environment variables. Option D is wrong because --variable is not a valid Podman flag; it does not exist.

28
Multi-Selectmedium

Which THREE of the following are valid options or flags when working with Podman secrets? (Choose THREE)

Select 3 answers
A.podman secret extract
B.podman secret rm
C.podman secret ls
D.podman secret compile
E.podman secret create
AnswersB, C, E

`podman secret rm` deletes a stored secret from Podman's secret store, satisfying the requirement to identify valid secret-management subcommands. It mirrors the removal operation available for other Podman objects, letting you clean up secrets no longer needed by containers. This is a genuine subcommand, unlike fabricated flags.

Why this answer

Option B, `podman secret rm`, is a valid Podman subcommand used to remove one or more existing secrets from Podman's secret store, so it correctly belongs to the `podman secret` command family. Option C, `podman secret ls`, is also valid because it lists all secrets currently managed by Podman, optionally with formatting or filtering flags. Option E, `podman secret create`, is valid as the primary command for creating a new secret from a file or standard input, which is the core operation for Podman secrets.

The unmarked options do not belong: `podman secret extract` (A) is not a Podman secret subcommand, and `podman secret compile` (D) is likewise not a recognized Podman secret operation.

Exam trap

EX188 often tests whether candidates can distinguish real Podman subcommands from plausible-sounding fabrications like 'extract' or 'compile' that do not exist in the CLI.

29
MCQeasy

An administrator needs to create a persistent storage volume that Podman can manage independently of any specific container lifecycle. Which command accomplishes this?

A.podman volume init mydata
B.podman storage volume-add mydata
C.podman create volume --name mydata
D.podman volume create mydata
AnswerD

'podman volume create mydata' creates a named volume managed by Podman's volume subsystem, persisting independently of any container's lifecycle. Anonymous volumes tied to a container are removed with it; named volumes survive container deletion, satisfying the persistence constraint.

Why this answer

`podman volume create mydata` is the correct command to create a named volume that Podman manages independently of any container's lifecycle. Named volumes persist after containers are removed and can be mounted into multiple containers, making them ideal for persistent data. This is the direct Podman equivalent of `docker volume create`.

Exam trap

EX188 often tests whether candidates confuse container creation commands (`podman create`) with volume management commands (`podman volume create`), or invent nonexistent subcommands like 'volume init'.

How to eliminate wrong answers

Option A is wrong because `podman volume init` is not a valid Podman subcommand — there is no 'init' action under volume management. Option B is wrong because `podman storage volume-add` is not a valid command syntax; Podman does not have a 'storage' top-level command with a 'volume-add' subcommand. Option C is wrong because `podman create volume --name mydata` is invalid syntax — `podman create` creates containers, not volumes, and does not accept a 'volume' positional argument.

30
MCQhard

When configuring an environment file for use with '--env-file', how are comment lines designated?

A.Using '//' at the beginning of the line
B.Using '#' at the beginning of the line
C.Using ';' at the beginning of the line
D.Using '/* ... */' block syntax
AnswerB

In an environment file, any line beginning with '#' is treated as a comment and ignored when parsed by '--env-file', so it never becomes a key-value variable. This lets teams annotate configuration without affecting the container's runtime environment.

Why this answer

In an environment file used with --env-file, comment lines are designated with a '#' at the beginning of the line. Podman (and Docker) parse these files line by line, treating lines starting with # as comments and ignoring them. This matches common shell-style and .env file conventions.

Exam trap

EX188 often tests the comment character for env files, and candidates confuse it with ';' from INI files or '//' from programming languages.

How to eliminate wrong answers

Option A is wrong because '//' is a comment syntax used in languages like C++ and JavaScript, not in env files. Option C is wrong because ';' is used in INI files and some configuration formats, but not in podman env files. Option D is wrong because '/* ... */' is C-style block comment syntax and is not supported in env files, which are line-oriented.

31
MCQmedium

An administrator wants to bind mount a host file directly into a container as a configuration file. Is this supported in Podman?

A.Yes, Podman supports bind mounting individual files from the host.
B.No, bind mounts are restricted to named volumes only.
C.No, Podman only supports bind mounting entire directories.
D.Yes, but only if the file is located inside /var/lib/containers.
AnswerA

Podman's bind mount mechanism operates at the file level, not just directories, so a single host file can be mapped to a container path. This suits injecting a configuration file without mounting an entire directory, and the mount is read-write by default unless :ro is appended.

Why this answer

Podman supports bind mounting individual files from the host into a container using the -v or --mount flag, e.g., `podman run -v /host/config.conf:/etc/config.conf:Z`. This is a standard OCI runtime feature and is fully supported.

Exam trap

The trap is assuming that bind mounts only work for directories, or that Podman restricts file mounts to specific paths; candidates may overthink SELinux or storage graph locations.

How to eliminate wrong answers

Option B is wrong because bind mounts are not restricted to named volumes; Podman supports both bind mounts and named volumes. Option C is wrong because Podman supports bind mounting both directories and individual files. Option D is wrong because there is no requirement for the file to be under /var/lib/containers; that directory is for Podman's internal storage, not a restriction for bind mounts.

32
MCQeasy

You have a file named config.env containing multiple KEY=VALUE pairs. Which flag allows you to load these configurations into a container as environment variables?

A.--config-file config.env
B.--volume config.env:/etc/env
C.--secret file=config.env
D.--env-file config.env
AnswerD

The --env-file flag reads a file of KEY=VALUE pairs and injects each as an environment variable inside the container, satisfying the requirement to load config.env without passing individual -e flags. Docker parses the file line by line at container start.

Why this answer

The --env-file flag allows you to specify a file containing KEY=VALUE pairs that will be loaded as environment variables in the container. This is the standard way to pass multiple environment variables from a file. The file format is simple: each line is a KEY=VALUE pair, and comments are supported with #.

Exam trap

EX188 often tests the confusion between --env-file (for environment variables) and --secret or --volume (for files), leading candidates to choose a file-mounting option.

How to eliminate wrong answers

Option A is wrong because --config-file is not a valid Podman flag for environment variables; it might be confused with Docker Compose or other tools. Option B is wrong because --volume mounts the file into the container as a file, not as environment variables; the application would need to read the file itself. Option C is wrong because --secret is used to mount secrets as files, not to load environment variables from a file.

33
Multi-Selectmedium

An administrator is preparing a Podman container that requires persistent storage for a web application. The storage must survive container restarts and be easily backed up. Which two types of storage mechanisms should the administrator consider? (Choose two.)

Select 2 answers
A.Anonymous volumes
B.Bind mounts from the host filesystem
C.tmpfs mounts
D.Named volumes managed by Podman
E.The container's writable layer
AnswersB, D

Bind mounts map a host directory or file directly into the container. The data resides on the host filesystem, so it persists beyond container lifecycles and can be backed up using standard host tools. They are suitable for persistent storage, especially when the data needs to be accessed or managed directly on the host. However, they require careful permission and SELinux configuration.

Why this answer

Named volumes and bind mounts are the two primary mechanisms for persistent storage in Podman. Named volumes are managed by Podman and persist independently, while bind mounts use host directories that persist on the host. The other options are either ephemeral or not designed for long-term persistence.

Exam trap

The trap here is thinking that anonymous volumes are a reliable persistent storage option, but they are difficult to manage and often removed with the container.

34
MCQmedium

An administrator needs to create a temporary filesystem mount stored purely in host memory for high-performance temporary data inside a container. Which mount type should be used?

A.podman run --ramdisk /app/cache myapp
B.podman run --mount type=memory,destination=/app/cache myapp
C.podman run --memory-mount /app/cache myapp
D.podman run --tmpfs /app/cache myapp
AnswerD

The --tmpfs flag mounts a memory-backed filesystem inside the container, storing data in host RAM rather than on disk. This delivers the high-performance temporary storage the scenario requires, and contents vanish when the container stops.

Why this answer

The --tmpfs flag in podman run mounts a tmpfs filesystem at the specified container path, backed entirely by host memory (and swap if enabled). This is the standard, documented way to provide high-performance ephemeral storage inside a container. tmpfs contents are lost when the container stops, which matches the 'temporary' requirement.

Exam trap

EX188 often tests whether candidates invent plausible-sounding but nonexistent flags like --ramdisk or --memory-mount, or confuse memory cgroup limits (--memory) with memory-backed mounts (--tmpfs).

How to eliminate wrong answers

Option A is wrong because --ramdisk is not a valid podman run flag — no such option exists in Podman's CLI. Option B is wrong because --mount type=memory is not a supported mount type; valid types are bind, volume, tmpfs, image, devpts, and glob. Option C is wrong because --memory-mount is not a Podman flag; memory-related flags are --memory and --memory-swap, which control cgroup limits, not mounts.

35
MCQeasy

Which flag can be passed to 'podman run' to automatically remove the container and its anonymous volumes upon exit?

A.podman run --delete-on-exit
B.podman run --clean
C.podman run --rm
D.podman run --purge
AnswerC

The --rm flag deletes the container automatically once it exits, and it also removes any anonymous volumes created with -v that were not given a name. This satisfies the requirement to clean up both the container and its anonymous volumes without manual pruning.

Why this answer

The --rm flag in podman run tells Podman to automatically remove the container and its anonymous volumes when the container exits. This is equivalent to the --rm flag in Docker and is commonly used for ephemeral containers. It helps keep the system clean by removing stopped containers and their associated anonymous volumes.

Exam trap

EX188 often tests the confusion between --rm and other cleanup flags like --delete or --purge, which do not exist in Podman.

How to eliminate wrong answers

Option A is wrong because --delete-on-exit is not a valid Podman flag; the correct flag is --rm. Option B is wrong because --clean is not a valid Podman run flag; it might be confused with podman system prune or similar cleanup commands. Option D is wrong because --purge is not a valid Podman flag; it is not used for container removal on exit.

36
Multi-Selecteasy

Which TWO types of storage mechanisms are natively supported by Podman for container data persistence? (Choose two.)

Select 2 answers
A.Shared memory block devices via NFS exports
B.Host bind mounts referencing directories on the host filesystem
C.Direct Fibre Channel LUN mapping inside containers
D.Managed volumes stored in Podman's storage graph
E.Distributed HDFS cluster mounts
AnswersB, D

Host bind mounts map an existing host directory straight into the container, so data written by the process lands on the host filesystem and survives container removal. This satisfies the persistence requirement natively, without extra drivers or plugins, because the mount is handled directly by the kernel.

Why this answer

Option B is correct because Podman natively supports host bind mounts, where a directory or file on the host filesystem is mapped directly into the container using the -v or --mount flag (e.g., -v /host/path:/container/path), making it a first-class persistence mechanism. Option D is correct because Podman also natively supports managed named volumes, which are created and tracked in Podman's own storage graph (typically under /var/lib/containers/storage/volumes for root or ~/.local/share/containers/storage/volumes for rootless users) and persist independently of container lifecycle. Option A is not a native Podman storage mechanism; NFS exports would have to be mounted on the host first and then exposed via a bind mount, and shared memory block devices are not a Podman persistence type.

Option C is incorrect because direct Fibre Channel LUN mapping is a host-level storage concern handled by the OS, not something Podman natively provides to containers. Option E is incorrect because HDFS is a distributed filesystem service external to Podman and is not a natively supported container storage driver.

Exam trap

The trap is selecting exotic storage types like NFS or Fibre Channel because they sound enterprise-ready; candidates may forget that Podman's native persistence is limited to bind mounts and managed volumes.

37
Multi-Selecthard

Which THREE inspection or cleanup actions can be performed on Podman secrets? (Choose THREE)

Select 3 answers
A.List existing secrets with 'podman secret ls'
B.Inspect secret metadata with 'podman secret inspect'
C.Compile secrets into binary format with 'podman secret compile'
D.Edit secret values in-place with 'podman secret edit'
E.Remove secrets with 'podman secret rm'
AnswersA, B, E

`podman secret ls` enumerates every secret stored in the Podman secret store, satisfying the inspection requirement. It queries the local secret database directly, returning names, IDs, and drivers without exposing secret values. This read-only listing is one of the three permitted inspection or cleanup actions, alongside `podman secret inspect` and `podman secret rm`.

Why this answer

Option A is correct because 'podman secret ls' is the standard subcommand that enumerates all secrets currently stored in Podman's secret store, showing IDs and names. Option B is correct because 'podman secret inspect' retrieves metadata about a secret (such as ID, name, driver, and timestamps) without exposing the secret payload. Option E is correct because 'podman secret rm' deletes one or more secrets from the store, which is the supported cleanup action.

Option C is not a real Podman subcommand; secrets are created via 'podman secret create' and are not compiled into a binary format. Option D is also invalid because Podman does not support editing secret values in place; secrets are immutable and must be removed and recreated to change their contents.

Exam trap

EX188 often tests the misconception that secrets can be edited in-place or compiled, when in fact they are immutable and only support list, inspect, create, and remove operations.

38
Multi-Selecteasy

Which TWO commands or flags are valid for managing Podman named volumes? (Choose TWO)

Select 2 answers
A.podman volume make
B.podman volume compile
C.podman volume build
D.podman volume create
E.podman volume ls
AnswersD, E

`podman volume create` provisions a named volume in Podman's local storage, satisfying the stem's requirement for a valid named-volume management command. It accepts flags such as `--driver` and `--label`, and the resulting volume persists independently of any container, unlike anonymous volumes created implicitly at runtime.

Why this answer

Option D, 'podman volume create', is correct because it is the actual Podman subcommand used to create a named volume, which can then be referenced by containers via the -v or --mount flag. Option E, 'podman volume ls', is correct because it lists all existing named volumes along with their driver and mountpoint, making it a valid management command. The other options do not belong: 'podman volume make' (A), 'podman volume compile' (B), and 'podman volume build' (C) are not real Podman subcommands and would return an unknown command error, since Podman's volume management verbs are create, ls, inspect, rm, and prune.

Exam trap

EX188 often tests basic Podman commands, and candidates may confuse volume subcommands with image or container subcommands, leading to invalid options like make or build.

39
Multi-Selecteasy

Which THREE storage-related items can be inspected using 'podman system df'? (Choose THREE)

Select 3 answers
A.Networks
B.Images
C.Containers
D.Volumes
E.Secrets
AnswersB, C, D

'podman system df' reports disk usage across containers, images and volumes. Images are listed because their read-only layers consume the bulk of local storage, and the command shows total image size, shared layers and reclaimable space, making images one of the three items the question requires.

Why this answer

The 'podman system df' command reports disk usage for the storage-related resources that Podman manages, and its output lists Images (B), Containers (C), and Volumes (D) with their total, active, and reclaimable sizes. Images (B) are included because Podman tracks the space consumed by locally stored image layers and their shared parents. Containers (C) are included because each container's writable layer occupies storage on disk.

Volumes (D) are included because named volumes persist data outside the container layer and their disk consumption is reported. Networks (A) and Secrets (E) are not storage-usage items reported by 'podman system df'; networks are runtime/network configuration and secrets are managed credential objects, neither of which appears in this command's output.

Exam trap

EX188 often tests whether candidates assume `podman system df` mirrors `docker system df` exactly — Docker includes build cache and networks in some views, so candidates wrongly select Networks.

40
MCQmedium

An administrator needs to create a Podman secret from a file on disk named 'secret.txt'. Which command correctly performs this action?

A.podman secret import db_secret secret.txt
B.podman create secret db_secret secret.txt
C.podman secret add db_secret --file secret.txt
D.podman secret create db_secret secret.txt
AnswerD

'podman secret create' takes the secret name followed by the source file path, so db_secret is created from secret.txt. This satisfies the requirement to build a Podman secret directly from an on-disk file rather than from stdin or an environment variable.

Why this answer

The correct syntax for creating a Podman secret from a file is `podman secret create <name> <file>`. Podman's secret subcommand mirrors Docker's `docker secret create` syntax, where the secret name comes first and the source file (or `-` for stdin) comes second. This command reads the file contents and stores them in Podman's secret store, making them available to containers via `--secret`.

Exam trap

EX188 often tests the exact subcommand hierarchy and argument order for Podman commands, so candidates who confuse `podman secret create` with Docker-style `import` or who place the file before the name will pick a wrong answer.

How to eliminate wrong answers

Option A is wrong because `podman secret import` is not a valid subcommand — Podman's secret subcommands are create, inspect, ls, rm, and exists, not import. Option B is wrong because `podman create secret` inverts the command hierarchy; `create` is a container subcommand, not a secret subcommand, and there is no `podman create secret` form. Option C is wrong because `podman secret add` is not a valid subcommand, and the `--file` flag does not exist for secret creation — the file is passed positionally.

41
MCQhard

An administrator wants to ensure that a bind-mounted directory allows propagation of mounts from the host into the container. Which mount option configures mount propagation mode?

A.podman run -v /host/dir:/container/dir:mtype=shared myapp
B.podman run -v /host/dir:/container/dir:shared myapp
C.podman run -v /host/dir:/container/dir:sync myapp
D.podman run -v /host/dir:/container/dir:propagate myapp
AnswerB

The shared propagation mode lets mounts performed on the host propagate into the container and vice versa, which is exactly the bind-mount behaviour requested. Without it, the default private mode isolates the mount namespace and host mounts never appear inside.

Why this answer

The :shared mount option on a bind mount configures mount propagation mode to shared, allowing mounts performed on the host to propagate into the container (and vice versa). The syntax is -v /host/dir:/container/dir:shared, where shared is the propagation mode keyword.

Exam trap

EX188 often tests mount propagation syntax, and candidates pick plausible-sounding keywords like propagate or mtype=shared instead of the actual kernel mode name shared.

How to eliminate wrong answers

Option A is wrong because mtype=shared is not valid Podman syntax — the propagation mode is specified directly as shared, not as a key=value pair. Option C is wrong because sync is not a mount propagation mode; the valid modes are shared, slave, private, and unbindable (plus rshared, rslave, rprivate, runbindable for recursive). Option D is wrong because propagate is not a valid keyword — the correct term is shared, and propagate is a related but distinct concept (mount --make-shared).

42
MCQeasy

An administrator needs to create a persistent storage area managed completely by Podman that does not rely on a specific host directory path. Which command should be used?

A.podman volume bind my_data
B.podman run -v /my_data
C.podman volume create my_data
D.podman create volume my_data
AnswerC

Podman volumes are stored in a Podman-managed location on the host, so no explicit host directory path is required. Creating the named volume with podman volume create my_data satisfies the persistence and host-path-independence constraints before it is mounted into a container.

Why this answer

podman volume create my_data creates a named volume managed by Podman's volume driver, which stores data in a Podman-controlled location (e.g., ~/.local/share/containers/storage/volumes for rootless) rather than a user-specified host path. This is exactly what the question asks for: persistent storage managed by Podman without relying on a specific host directory.

Exam trap

EX188 often tests the exact subcommand ordering — 'podman volume create NAME' versus the reversed 'podman create volume NAME' — and whether candidates confuse named volumes with bind mounts.

How to eliminate wrong answers

Option A is wrong because 'podman volume bind' is not a valid subcommand — bind mounts are configured at run time via -v /host/path:/container/path, not by a volume subcommand. Option B is wrong because 'podman run -v /my_data' is malformed — a single path with no container target is not a valid volume specification, and it does not create a managed volume. Option D is wrong because 'podman create volume my_data' has the verb and noun reversed; the correct syntax is 'podman volume create my_data'.

43
Multi-Selectmedium

Which TWO conditions are required for a non-root (rootless) user to successfully bind mount a host directory into a container? (Choose TWO)

Select 2 answers
A.Direct modification of the host kernel mount tables
B.The user must have read/write access to the host directory on the host file system
C.Disabling user namespaces across the system
D.Root privileges on the host operating system
E.Proper SELinux labeling (such as :z or :Z) if SELinux is enforcing
AnswersB, E

Rootless bind mounts are performed by the unprivileged user's own UID mapping, so the kernel enforces ordinary file permissions on the source path. Without read/write access to that host directory, the mount either fails or yields an unusable, read-only view.

Why this answer

Option B is correct because a rootless user can only bind mount a host directory into a container if that user actually has read/write permissions on the source directory in the host filesystem; without those permissions, the mount would be denied or the container process could not access the content. Option E is correct because when SELinux is enforcing, the host directory must carry a label that the container process is allowed to access, typically applied with the :z or :Z volume option so the bind mount is not blocked by SELinux policy. Option A is not required and is generally impossible for a non-root user, since directly editing kernel mount tables requires root privileges.

Option C is incorrect because disabling user namespaces would remove the very mechanism that enables rootless containers, not help bind mounting. Option D is incorrect because the whole point of a rootless container is to operate without root privileges on the host.

Exam trap

EX188 often tests the misconception that rootless containers require root privileges or kernel modifications — candidates overlook the need for host filesystem permissions and SELinux labeling.

44
MCQeasy

A developer needs to pass several environment variables to a container from a file named web.env. The file contains lines such as DB_HOST=localhost and DB_PORT=5432. Which Podman run flag should be used to load these variables into the container?

A.--config web.env
B.--env-file web.env
C.--environment-file web.env
D.--env web.env
AnswerB

The --env-file flag reads environment variables from a file and passes them into the container. Each line in the file must be in KEY=VALUE format, which matches the described web.env file. This is the correct way to inject multiple variables without listing them individually on the command line. It is widely used for configuration management in containerized applications.

Why this answer

The --env-file flag is designed to read environment variables from a file, with each line in KEY=VALUE format. This matches the scenario where web.env contains multiple variables. The other options either use incorrect flag names or misinterpret how environment variables are passed to containers.

Exam trap

The trap here is assuming that --env can accept a filename, when it actually sets a single variable directly.

45
MCQeasy

How can an administrator remove all unused, dangling Podman volumes that are not currently attached to any container?

A.podman rm --volumes
B.podman volume rm --all
C.podman volume clean
D.podman volume prune
AnswerD

podman volume prune removes all volumes not referenced by any container, matching the dangling-volume requirement exactly. Unlike podman volume rm, it needs no explicit volume names, so it clears unused volumes in one non-interactive command.

Why this answer

'podman volume prune' removes all volumes not currently referenced by any container — exactly the definition of dangling or unused volumes. It is the dedicated cleanup command for reclaiming storage from orphaned volumes, and it prompts for confirmation unless run with --force. This is the correct tool when an administrator wants to bulk-remove unattached volumes.

Exam trap

EX188 often tests whether candidates confuse container-scoped volume removal (podman rm -v) with system-wide cleanup (podman volume prune), or invent non-existent flags like --all or subcommands like clean.

How to eliminate wrong answers

Option A is wrong because 'podman rm --volumes' (or -v) removes the anonymous volumes associated with a specific container being deleted, not all unused volumes system-wide. Option B is wrong because 'podman volume rm --all' is not a valid combination — 'volume rm' requires explicit volume names, and there is no --all flag for it. Option C is wrong because 'podman volume clean' is not a real subcommand; the correct verb is 'prune'.

46
Multi-Selecteasy

Which TWO commands are used to manage Podman secrets? (Choose TWO)

Select 2 answers
A.podman secret create
B.podman secret compile
C.podman secret update
D.podman secret ls
E.podman secret modify
AnswersA, D

Creating a secret stores sensitive data in Podman's secret store, from which it can be injected into containers at runtime rather than baked into images or environment variables. This is the foundational write operation for the secret management workflow.

Why this answer

Option A, `podman secret create`, is correct because it is the command used to create a new secret in Podman's secret store, reading the secret value from a file or stdin and registering it under a given name for later use by containers. Option D, `podman secret ls`, is correct because it lists all secrets currently stored in the Podman secret store, allowing administrators to verify which secrets exist. The other options are not valid Podman subcommands: `podman secret compile`, `podman secret update`, and `podman secret modify` do not exist in Podman's CLI, so they cannot be used to manage secrets.

Exam trap

EX188 often tests whether candidates confuse Podman's immutable secret model with Docker/Kubernetes patterns that allow updates — candidates pick `update` or `modify` assuming secrets can be edited in place.

47
MCQhard

An administrator runs a container with a SELinux-relabeled host directory mount using the Z option, but multiple containers need to share write access to this exact same volume. Which option should be used instead?

A.podman run -v /host/data:/data:O
B.podman run -v /host/data:/data:Z
C.podman run -v /host/data:/data:z
D.podman run -v /host/data:/data:shared
AnswerC

Lowercase z relabels content so multiple containers can share the volume.

Why this answer

The `:z` option applies a shared SELinux label to the volume, allowing multiple containers to access the same content. When multiple containers need write access to the same host directory, `:z` is the correct choice because it relabels the content with a shared MCS category rather than a private one.

Exam trap

EX188 often tests the `:z` vs `:Z` distinction; candidates may pick `:Z` for shared access because they think uppercase means 'more permissive', when actually `:Z` is private and `:z` is shared.

How to eliminate wrong answers

Option A is wrong because `:O` is not a valid SELinux mount option in Podman; it may be confused with other flags. Option B is wrong because `:Z` applies a private label, which would prevent other containers from accessing the volume. Option D is wrong because `:shared` is not a valid SELinux suffix; it is a mount propagation option, not an SELinux label.

Ready to test yourself?

Try a timed practice session using only Storage And Configuration questions.