Courseiva

EX200 Deploy, configure, and maintain systems Practice Question

An administrator needs to create a 10GB logical volume named 'mylv' in an existing volume group 'vg1', format it with XFS, and mount it at /mnt/data. Which set of commands achieves this correctly?

⚠ Common exam trap

Red Hat often tests the distinction between `>` (overwrite) and `>>` (append) in fstab manipulation, and the correct LVM device path format (`/dev/vg1/mylv` vs. `/dev/mylv`), to catch candidates who confuse volume group names with logical volume paths or misuse shell redirection.

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

✓

lvcreate -n mylv -L 10G vg1 && mkfs.xfs /dev/vg1/mylv && mount /dev/vg1/mylv /mnt/data && echo "/dev/vg1/mylv /mnt/data xfs defaults 0 0" >> /etc/fstab

It uses the proper `lvcreate` syntax with `-n` for name and `-L` for size, creates the logical volume `/dev/vg1/mylv`, formats it with XFS, mounts it, and appends the correct fstab entry using `>>` to avoid overwriting existing entries. The device path `/dev/vg1/mylv` is the standard LVM device mapper path for a logical volume named 'mylv' in volume group 'vg1'.

Answer analysis

Option-by-option breakdown

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

  • ✓

    lvcreate -n mylv -L 10G vg1 && mkfs.xfs /dev/vg1/mylv && mount /dev/vg1/mylv /mnt/data && echo "/dev/vg1/mylv /mnt/data xfs defaults 0 0" >> /etc/fstab

    Why this is correct

    This command correctly creates a 10GB logical volume named mylv, formats it as XFS, mounts it to /mnt/data, and persists the mount in /etc/fstab. `lvcreate -n mylv -L 10G vg1` creates the LV and exposes it at `/dev/vg1/mylv`, which is then formatted with `mkfs.xfs` and mounted. The `echo` command appends a properly formatted fstab entry — device, mount point, filesystem type, options, dump, and pass fields — to `/etc/fstab` using `>>`, which preserves all existing entries. This is the only option that correctly leaves the system configured to mount the LV automatically after a reboot.

  • ✗

    lvcreate -n mylv -L 10G vg1 && mkfs.xfs /dev/vg1/mylv && mount /dev/vg1/mylv /mnt/data && blkid /dev/vg1/mylv >> /etc/fstab

    Why it's wrong here

    This option successfully creates and formats the LV and mounts it, but the final persistence step is invalid. `blkid /dev/vg1/mylv` outputs a line such as `/dev/vg1/mylv: UUID="..." TYPE="xfs"`, which is not in the six-field format that `/etc/fstab` requires; it lacks mount point, options, dump, and pass fields. Appending this raw blkid output to `/etc/fstab` would corrupt the file and prevent the system from parsing it correctly, so the LV would not be automatically mounted at boot. This is why `blkid` output cannot be used as an fstab entry and is not an acceptable replacement for a manually written line.

  • ✗

    lvcreate -n mylv -L 10G vg1 && mkfs.xfs /dev/vg1/mylv && mount /dev/vg1/mylv /mnt/data && echo "/dev/vg1/mylv /mnt/data xfs defaults 0 0" > /etc/fstab

    Why it's wrong here

    This option is almost correct, but it uses the redirection operator `>` instead of `>>` when writing to `/etc/fstab`. The `>` operator truncates the entire file first, overwriting all existing mount definitions and leaving only the new line, whereas `>>` appends to the end of the file. Because `/etc/fstab` typically contains critical entries for `/`, `/boot`, and other filesystems, truncating it could make the system unbootable or drop you into emergency mode at the next reboot. Therefore, although the text being written is a valid fstab entry, the method of writing it is dangerously wrong.

  • ✗

    lvcreate -n mylv --size 10G vg1 && mkfs.xfs /dev/mylv && mount /dev/mylv /mnt/data && echo "/dev/mylv /mnt/data xfs defaults 0 0" >> /etc/fstab

    Why it's wrong here

    The `lvcreate` command here is valid because `--size 10G` is equivalent to `-L 10G`, but every subsequent command references `/dev/mylv` instead of `/dev/vg1/mylv`. In LVM, logical volumes are exposed at `/dev/<volume_group>/<logical_volume>`, so the correct device path is `/dev/vg1/mylv`, not `/dev/mylv`; a device node like `/dev/mylv` does not exist. As a result, `mkfs.xfs /dev/mylv`, `mount /dev/mylv`, and the fstab entry `/dev/mylv /mnt/data ...` would all fail because the kernel cannot find the device. This option tests the common misconception that the volume group name is omitted from the device path.

About these practice questions

Courseiva writes every EX200 question from scratch — 427 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.