LPIC-1 Devices, Filesystems and FHS Practice Question
A system administrator needs to check if a filesystem has any errors without actually performing a repair. Which command should be used?
⚠ Common exam trap
Many exam-takers confuse `-N` (which only shows what would be checked without actually scanning) with `-n` (which performs a read-only scan), leading candidates to mistakenly choose the dry-run option instead of the actual read-only check.
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
✓
fsck -n /dev/sdb1
The `-n` option with `fsck` performs a read-only check, displaying any filesystem errors without making any modifications or repairs. This is the correct choice for a non-destructive check that only reports issues.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
fsck -y /dev/sdb1
Why it's wrong here
fsck -y automatically answers yes to every prompt, so it repairs corruption rather than only reporting it. The stem explicitly forbids performing a repair, making this destructive. It suits unattended boot-time recovery where automatic fixing is desired, not a read-only diagnostic check.
- ✗
fsck -N /dev/sdb1
Why it's wrong here
fsck -N lists the filesystem type and the commands that would run, then exits without touching the disk. It reports no actual errors, so it cannot satisfy the check requirement. It is tempting as a safe dry run, but it merely previews invocation rather than validating metadata.
- ✓
fsck -n /dev/sdb1
Why this is correct
The `-n` flag makes fsck answer "no" to every prompt, so it opens the filesystem read-only and reports errors without writing repairs — satisfying the no-repair constraint. Unlike `-y`, which auto-fixes, `-n` guarantees the check is non-destructive, though it may skip some checks needing write access.
- ✗
e2fsck -p /dev/sdb1
Why it's wrong here
e2fsck -p preens the filesystem, automatically fixing safe-to-repair faults without prompting. That mutates metadata, violating the no-repair requirement. It is tempting because preening is non-interactive, but it is designed for unattended boot checking, not a purely diagnostic pass.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 402-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 LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.