Courseiva
System Architecture →hardMultiple Choice

LPIC-1 System Architecture Practice Question

A company runs a critical database server on Linux. The server has a hardware RAID controller with two logical volumes: one for the operating system (LV1) and one for the database data (LV2). The server uses LVM on top of the RAID volumes. Recently, the database performance has degraded. The administrator suspects that the file system on LV2 is heavily fragmented. The server uses the ext4 filesystem. The administrator wants to check the fragmentation level and, if necessary, defragment the filesystem without unmounting it or causing downtime. What should the administrator do to minimize fragmentation impact while maintaining availability?

⚠ Common exam trap

Test-takers frequently assume ext4 has no online defragmentation support at all, but e4defrag provides a limited online capability, or they may confuse e4defrag with e2fsck, which requires unmounting.

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

✓

Use the e4defrag command with the -v option on the mount point to check and defragment files online.

e4defrag is a userspace tool that provides online defragmentation for ext4 filesystems. It can check fragmentation levels and defragment files without unmounting the filesystem, thus avoiding downtime. This allows the administrator to minimize fragmentation impact while maintaining availability.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Create a new filesystem on LV2, copy data back, and symlink the old mount point to the new one.

    Why it's wrong here

    Creating a fresh filesystem and copying data requires unmounting LV2 or taking the database offline, causing the downtime the scenario forbids, and symlinking a mount point does not preserve the original path transparently. It is tempting for eliminating fragmentation completely, and would be correct during a planned maintenance window with full application downtime.

  • ✗

    Use tune2fs to set the reserved block percentage to 0 and increase the inode size.

    Why it's wrong here

    tune2fs adjusts reserved block percentage and inode size at filesystem creation or tuning time; it neither measures fragmentation nor relocates existing extents, so it cannot reduce fragmentation on a mounted LV2. It is tempting for reclaiming reserved space on data volumes, and would be correct when tuning a new filesystem's capacity rather than defragmenting one.

  • ✗

    Schedule a maintenance window, unmount LV2, run e2fsck -fn, then run e2fsck -D to defragment.

    Why it's wrong here

    Unmounting LV2 and running e2fsck -D requires downtime, directly violating the no-downtime requirement; e2fsck cannot safely operate on a mounted filesystem. It is tempting because offline defragmentation is the traditional, thorough method for ext4, and would suit a scheduled maintenance window where availability is not a constraint.

  • ✓

    Use the e4defrag command with the -v option on the mount point to check and defragment files online.

    Why this is correct

    The e4defrag utility operates on mounted ext4 filesystems, satisfying the no-downtime constraint. Its -v flag reports each file's fragmentation score before and after defragmentation, letting the administrator assess LV2 and defragment online. Note that e4defrag works per-file and cannot defragment directories or free space, unlike offline fsck-based approaches.

Quick reference

RAID Level Comparison

RAID LevelMin DisksFault ToleranceReadWriteUsable Capacity
RAID 02NoneExcellentExcellent100%
RAID 121 diskGoodModerate50%
RAID 531 diskGoodModerate67–94%
RAID 642 disksGoodLower50–88%
RAID 1041 disk per mirrorExcellentGood50%

RAID is not a backup strategy — it protects against disk failure but not against accidental deletion, ransomware, or site-level events.

About these practice questions

One of 402 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.