EX200 Create and configure file systems Practice Question
A system administrator needs to create an XFS filesystem on /dev/sdb1 with the label 'data'. Which command should be used?
⚠ Common exam trap
It's easy for candidates to confuse the lowercase `-l` (used for log parameters in mkfs.xfs) with the uppercase `-L` (used for labels), or thinking that `xfs_admin` can create a filesystem when it only modifies existing ones.
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 -L data /dev/sdb1
The `mkfs.xfs` command creates an XFS filesystem, and the `-L` flag assigns a label to the filesystem during creation. The command `mkfs.xfs -L data /dev/sdb1` correctly creates an XFS filesystem on the specified partition with the label 'data'.
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 -L data /dev/sdb1
Why it's wrong here
This command formats /dev/sdb1 using the ext4 filesystem driver and labels it 'data' with the -L option. Although mkfs.ext4 accepts -L to assign a volume label at creation, the resulting filesystem is ext4, not the required XFS. The administrator specifically needs an XFS filesystem, so this command creates the wrong on-disk format and is therefore incorrect.
- ✗
mkfs.xfs -l data /dev/sdb1
Why it's wrong here
The lowercase -l option in mkfs.xfs is reserved for configuring the internal log, such as its size or alignment parameters (e.g., -l size=64m), not for setting a label. Passing a bare string 'data' after -l will be misinterpreted and likely cause the command to fail or create a filesystem with invalid log options. To set a label, the uppercase -L must be used, making this command syntactically invalid for the intended purpose.
- ✗
xfs_admin -L data /dev/sdb1
Why it's wrong here
xfs_admin is a utility for modifying attributes of an already-created XFS filesystem, such as changing its label (-L) or UUID (-U). It reads and updates the existing superblock, so if /dev/sdb1 has not been formatted with XFS, the command will fail due to an unrecognized superblock. Creating a new XFS filesystem with a label requires mkfs.xfs -L data /dev/sdb1; xfs_admin cannot be used as a creation tool.
- ✓
mkfs.xfs -L data /dev/sdb1
Why this is correct
This command creates a new XFS filesystem on /dev/sdb1 and assigns the volume label 'data' in a single step using the uppercase -L option. The -L flag is the correct way to set a label during XFS creation, unlike the lowercase -l which configures the log. This exactly matches the requirement to create an XFS filesystem with the specified label, so it is the correct answer.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 427-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.