LPIC-1 Devices, Filesystems and FHS Practice Question
A system administrator wants to ensure that the filesystem on /dev/sdb1 is checked for errors every 30 mounts. Which command accomplishes this?
⚠ Common exam trap
It's easy for candidates to confuse the `-c` option of `tune2fs` (set mount count) with the `-c` option of `e2fsck` (bad-block check), leading candidates to mistakenly choose `e2fsck -c 30`.
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
✓
tune2fs -c 30 /dev/sdb1
The `tune2fs` command is used to adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems. The `-c` option sets the maximum mount count between filesystem checks; `tune2fs -c 30 /dev/sdb1` configures the filesystem to trigger an `fsck` check every 30 mounts. This is the correct tool for modifying this persistent setting.
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 -c 30 /dev/sdb1
Why it's wrong here
fsck's -c option performs a bad-blocks scan; it does not set a mount-count interval, and fsck merely dispatches to the type-specific checker. It is tempting as the generic checker, and it is correct when you want to scan for bad blocks, not configure the every-30-mounts policy.
- ✗
e2fsck -c 30 /dev/sdb1
Why it's wrong here
e2fsck's -c flag requests a bad-blocks scan, not a mount-count interval; the every-30-mounts setting lives in the filesystem superblock, written by tune2fs -c 30. Running e2fsck -c is tempting because e2fsck is the ext checker, and it is correct when you genuinely want a read-only bad-block scan.
- ✓
tune2fs -c 30 /dev/sdb1
Why this is correct
`tune2fs -c 30 /dev/sdb1` sets the maximum mount count to 30 on the ext2/3/4 filesystem, satisfying the requirement to trigger `e2fsck` after every 30 mounts. The `-c` flag directly controls this counter, whereas `-i` would set a time-based interval instead.
- ✗
mount -o errors=remount-ro
Why it's wrong here
errors=remount-ro only defines the kernel's reaction to a detected error during normal operation; it never schedules a periodic check after 30 mounts. It is tempting because it concerns filesystem error handling, and it is the right choice when you want a filesystem remounted read-only on failure rather than a mount-count check.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 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 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.