Courseiva

EX200 Create and configure file systems Practice Question

A system administrator has added a new disk /dev/sdb to a Red Hat Enterprise Linux 9 server. The directory /data already exists. Which two steps must be performed to prepare the disk for mounting as an XFS file system at /data?

⚠ Common exam trap

Test-takers frequently think mounting or adding an fstab entry is a preparatory step, but the question specifically asks for steps to prepare the disk for mounting, which are partitioning and creating the file system.

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

✓

Run mkfs.xfs on the partition (e.g., mkfs.xfs /dev/sdb1)

After creating a partition on /dev/sdb, you must format it with the XFS file system using mkfs.xfs. This writes the XFS superblock and metadata structures to the partition, making it ready for mounting. Without this step, the partition has no file system and cannot be mounted.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Run mkfs.xfs on the partition (e.g., mkfs.xfs /dev/sdb1)

    Why this is correct

    Without a filesystem, the partition is just raw block storage; the kernel cannot mount it because there is no superblock or inode structure to manage files. Running mkfs.xfs writes the XFS superblock, allocation groups, and journaling structures onto /dev/sdb1, making it a valid, mountable filesystem. This step is mandatory after partitioning and before attempting any mount operation.

  • ✗

    Mount the partition to /data (mount /dev/sdb1 /data)

    Why it's wrong here

    The mount attempt will fail with an error like 'wrong fs type, bad option, bad superblock' if no filesystem exists on /dev/sdb1, because the kernel cannot interpret the raw partition. Mounting is the last action in the workflow, performed only after a filesystem has been created and, ideally, after verifying the mount point exists. At this preparatory stage, the partition is not ready to be attached to the directory tree.

  • ✓

    Create a partition on /dev/sdb (e.g., fdisk /dev/sdb)

    Why this is correct

    A whole disk without a partition table has no defined boundaries; tools like mkfs are typically run on a partition (e.g., /dev/sdb1), not on the whole disk, to avoid overwriting partition metadata. Using fdisk (or parted/gdisk) to create a partition table and a single partition assigns a device node (sdb1) with a specific size and type, providing the logical container on which a filesystem can then be built. Without this step, the subsequent mkfs.xfs command would target the raw device, which is not the intended administrative practice for a new disk.

  • ✗

    Create the /data directory (mkdir -p /data)

    Why it's wrong here

    The mount point /data is already present in the filesystem hierarchy; recreating it with mkdir -p is redundant and may even change ownership or permissions if done carelessly. The correct prerequisite is to confirm the directory exists and has appropriate permissions, not to create it, because mounting requires an existing directory as the target. This step is not part of the partitioning/filesystem preparation sequence.

  • ✗

    Add an entry to /etc/fstab for the new mount

    Why it's wrong here

    The /etc/fstab file is used by systemd and mount -a to automatically mount filesystems at boot; adding an entry now would cause boot-time failures if the filesystem is not yet created and the partition does not contain a valid superblock. This step belongs after mkfs.xfs and after verifying the mount works manually, typically using the UUID or device path. It is also not a preparatory step for a one-time mount, as it makes the mount persistent.

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.