EX200 Create and configure file systems Practice Question
Which command creates an XFS filesystem on /dev/nvme0n1p1 and sets the label to 'data'?
⚠ Common exam trap
Many exam-takers confuse the `-L` (label) flag with the `-l` (log) flag, as they look similar but have completely different functions in XFS, and candidates often misremember the option letter from other filesystem tools.
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/nvme0n1p1
The `-L` flag in `mkfs.xfs` is used to set the filesystem label. The command `mkfs.xfs -L data /dev/nvme0n1p1` creates an XFS filesystem on the specified partition and assigns it 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.xfs -l data /dev/nvme0n1p1
Why it's wrong here
The lowercase -l option in mkfs.xfs is reserved for log configuration suboptions (e.g., logdev=..., size=...), not for naming the filesystem. Supplying `data` as its argument is syntactically invalid and will be rejected; even if parsed, it would attempt to set log parameters rather than the volume label. Only uppercase -L assigns the label, so this command fails to produce a filesystem labeled `data`.
- ✗
mkfs.xfs -f /dev/nvme0n1p1
Why it's wrong here
The -f flag forces mkfs.xfs to overwrite any existing filesystem signature on the partition, which is useful when re-creating a filesystem. However, it controls neither the label nor any naming parameter: the resulting XFS volume will have no label unless an explicit label option (like -L) is given. Because the question requires a labeled filesystem, this command is incomplete.
- ✓
mkfs.xfs -L data /dev/nvme0n1p1
Why this is correct
Uppercase -L is the mkfs.xfs option for setting the XFS volume label, and `data` becomes that label on /dev/nvme0n1p1. This creates a filesystem that can later be referenced via `-L data` in mount options or by symlinks under /dev/disk/by-label/. The command is correct as written and satisfies the requirement to create a labeled XFS filesystem.
- ✗
mkfs.xfs -n data /dev/nvme0n1p1
Why it's wrong here
The -n option configures XFS naming/version parameters such as ftype, not the filesystem label. In this context `data` is not a valid naming setup, and the option is only used to tune features like the version of the naming protocol or ftype values. Therefore the command would error out or set an unintended naming feature, not label the volume, making it wrong.
Go deeper
Related to this question
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 →
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.