EX200 Create and configure file systems Practice Question
Which TWO of the following commands can be used to create an XFS filesystem on a block device?
⚠ Common exam trap
Many exam-takers confuse filesystem creation commands with management commands (like `xfs_admin`) or assume `mke2fs` is a generic tool that can create any filesystem type, when it is strictly for ext2/3/4 families.
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 `mkfs.xfs` command (option B) directly creates an XFS filesystem on a block device. The `mkfs -t xfs` command (option E) is the generic front-end that calls the same XFS-specific tool, making both valid. These are the standard methods for formatting a partition with the XFS filesystem in Red Hat Enterprise Linux.
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.ext4 /dev/sdb1
Why it's wrong here
mkfs.ext4 is a specialized wrapper that invokes the ext2/3/4 mkfs code to format /dev/sdb1 as an ext4 filesystem. Although ext4 supports journaling and extents, its on-disk layout is completely different from XFS's allocation groups and B+tree structures. Using this command would destroy any existing data with an ext4 superblock, so it cannot satisfy a requirement to create an XFS filesystem.
- ✓
mkfs.xfs /dev/sdb1
Why this is correct
mkfs.xfs is the XFS-specific formatting utility provided by the xfsprogs package. Running it against /dev/sdb1 initializes the partition with an XFS superblock, allocation-group headers, and the associated metadata structures. It is the canonical, unambiguous command for creating an XFS filesystem, which makes it a correct answer.
- ✗
xfs_admin /dev/sdb1
Why it's wrong here
xfs_admin is a filesystem-tuning and inspection tool for already-created XFS filesystems, not a creation utility. It expects an existing XFS superblock and typically requires the device to be unmounted or uses flags to modify UUID, label, or other properties. On a bare /dev/sdb1 partition, xfs_admin cannot create the filesystem and will fail before making any change.
- ✗
mke2fs /dev/sdb1
Why it's wrong here
mke2fs is the underlying tool for ext2, ext3, and ext4 filesystem creation; with no -t option it defaults to ext2, and even with -t ext4 it still produces an ext-family filesystem. Its superblock, block bitmap, and inode-table layout are incompatible with XFS. Therefore mke2fs would not create the required XFS structures and is an incorrect choice.
- ✓
mkfs -t xfs /dev/sdb1
Why this is correct
mkfs -t xfs invokes the generic mkfs front-end with an explicit filesystem type, causing it to dispatch to mkfs.xfs under the xfsprogs utilities. The result is the same formatted XFS filesystem as running mkfs.xfs directly. Because the -t flag unambiguously selects XFS, this is a valid alternative way to create the required filesystem.
Go deeper
Related to this question
About these practice questions
One of 427 original EX200 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.