Courseiva
Block Devices, Filesystems and Advanced StoragemediumMultiple ChoiceObjective-mapped

LPIC-2 lvextend / lvresize Practice Question

An administrator needs to extend an ext4 filesystem on logical volume 'home' by 5 GB. The volume group 'vg' has free extents. Which sequence of commands is correct?

⚠ Common exam trap

It's easy for candidates to choose option A because it uses the correct order but fails to notice the exact size requirement (+100%FREE vs +5G). They might also incorrectly believe that `mount -o remount` triggers a filesystem resize.

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

lvresize -L +5G /dev/vg/home; e2fsck -f /dev/vg/home; resize2fs /dev/vg/home

The correct sequence is to first extend the logical volume by the required size using `lvresize -L +5G` (or `lvextend`), optionally check the filesystem with `e2fsck -f`, and then resize the filesystem with `resize2fs`. This ensures the filesystem can utilize the newly allocated space. Option A is incorrect because it extends by all free extents, not exactly 5 GB. Option B reverses the order, which fails because `resize2fs` cannot extend beyond the current block device. Option C uses `mount -o remount`, which does not resize the filesystem.

Answer analysis

Option-by-option breakdown

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

  • lvextend -l +100%FREE /dev/vg/home; resize2fs /dev/vg/home

    Why it's wrong here

    Incorrect. The `-l +100%FREE` option extends the logical volume by all free extents, but the question requires exactly 5 GB. Also, the order is correct but the size is wrong.

  • resize2fs /dev/vg/home; lvextend -L +5G /dev/vg/home

    Why it's wrong here

    Incorrect. Reversing the order (filesystem resize before LV extend) will fail because the filesystem cannot be larger than the underlying block device.

  • lvextend -L +5G /dev/vg/home; mount -o remount /dev/vg/home

    Why it's wrong here

    Incorrect. While `lvextend -L +5G` correctly extends the LV, `mount -o remount` does not resize the ext4 filesystem; it only remounts the filesystem without changing its size.

  • lvresize -L +5G /dev/vg/home; e2fsck -f /dev/vg/home; resize2fs /dev/vg/home

    Why this is correct

    Correct. `lvresize -L +5G` (equivalent to `lvextend`) extends the logical volume by 5 GB, `e2fsck -f` optionally checks the filesystem, and `resize2fs` resizes the filesystem to use the new space.

About these practice questions

Courseiva writes every LPIC-2 question from scratch — 507 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 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-2 exam.