LFCS Storage Management Practice Question
A junior administrator needs to identify the filesystem type of the device /dev/nvme0n1p2 on a running Linux server without mounting it or modifying any metadata. Which command should be used?
⚠ Common exam trap
Candidates often confuse the partition-table type code shown by fdisk with the actual filesystem type, which only a superblock probe such as blkid can confirm.
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
✓
blkid /dev/nvme0n1p2
blkid reads filesystem superblocks and reports the type without mounting or altering the device, making it the safest and most direct way to identify the filesystem on /dev/nvme0n1p2. fdisk shows partition-table type codes rather than real filesystem metadata, mounting is unnecessarily invasive, and lsblk -f is a broader listing that is less targeted for a single-device query.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
blkid /dev/nvme0n1p2
Why this is correct
blkid probes the device for filesystem signatures and prints attributes such as TYPE and UUID. It reads the superblock directly and does not mount the filesystem or change anything on disk. This makes it the appropriate, low-risk tool for identifying whether /dev/nvme0n1p2 holds XFS, ext4, swap, or another filesystem, which is precisely what the administrator needs in this situation.
- ✗
lsblk -f
Why it's wrong here
lsblk -f does display filesystem type and UUID for block devices, so it can show the same information, but it reports on all block devices rather than a single partition. The question asks specifically for the command to identify the filesystem type of /dev/nvme0n1p2, and lsblk -f is a broader listing tool. blkid is the more targeted and precise utility for querying one device.
- ✗
mount /dev/nvme0n1p2 /mnt
Why it's wrong here
Mounting the device attaches the filesystem to the directory tree and may trigger journal recovery or other writes, which violates the requirement to avoid modifying metadata. It also requires knowing or guessing the filesystem type or relying on auto-detection, and it needs a free mount point. Mounting is a heavier operation than identification and is not appropriate for this task.
- ✗
fdisk -l /dev/nvme0n1p2
Why it's wrong here
fdisk -l lists partition tables and shows partition boundaries and type codes, but the type code is a partition-table hint, not the actual filesystem type. It also expects a whole disk as an argument rather than a partition, and on a partition it may display misleading information. It does not inspect filesystem superblocks, so it cannot reliably tell you whether the partition contains XFS or ext4.
Go deeper
Related to this question
About these practice questions
This LFCS question is part of Courseiva's 406-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.