EX200 Deploy, configure, and maintain systems Practice Question
A RHEL 9 system has a second disk /dev/sdb that needs to be partitioned with a single partition using all space, formatted with XFS, and mounted persistently at /data. The administrator uses fdisk to create the partition /dev/sdb1. Which filesystem creation command should be used?
⚠ Common exam trap
Many exam-takers confuse mkfs.xfs with generic mkfs commands or ext-family tools, assuming any mkfs variant will work, but the exam specifically tests knowledge of the correct filesystem-specific command for XFS.
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
✓
mkfs.xfs /dev/sdb1
The correct command is mkfs.xfs /dev/sdb1 because the question specifies that the partition must be formatted with XFS. The mkfs.xfs command is the dedicated tool for creating an XFS filesystem on a block device. It directly invokes the mkfs.xfs utility, which writes the XFS superblock and metadata structures to the partition.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
mkfs.xfs /dev/sdb1
Why this is correct
mkfs.xfs is the correct command because it explicitly initializes an XFS filesystem on the target partition. XFS is the default filesystem in RHEL 9 for root and many standard partitions, and this invocation creates the required on-disk structure, including the superblock, allocation groups, and B+tree metadata. After running this command, the partition can be mounted and used as an XFS volume.
- ✗
mke2fs /dev/sdb1
Why it's wrong here
mke2fs is a dedicated ext2/ext3/ext4 filesystem creation tool, not a generic mkfs front-end. Running it without a type flag creates an ext2 filesystem by default, and even with -t ext4 it still operates only within the ext family. Since the requirement is an XFS filesystem, mke2fs cannot satisfy it and would actually format the partition with the wrong on-disk format.
- ✗
mkfs -t ext4 /dev/sdb1
Why it's wrong here
mkfs -t ext4 explicitly selects the ext4 filesystem type via the -t option, making the intent unambiguous. The mkfs front-end dispatches to the ext4-specific builder, producing an ext4 journaling filesystem rather than XFS. On RHEL 9, where XFS is the default, this command would be used only if ext4 were purposefully chosen; it cannot fulfill a requirement for XFS.
- ✗
mkfs.ext4 /dev/sdb1
Why it's wrong here
mkfs.ext4 is a convenience wrapper that invokes the ext4 filesystem builder, allocating an ext4 journaling structure with its own superblock and inode tables. This is fundamentally different from XFS, which uses allocation groups and a 64-bit design. On RHEL 9, where XFS is the default filesystem for standard partitions, using mkfs.ext4 would create a filesystem that fails the stated XFS requirement and may not be appropriate for the intended workloads.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 127-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.