Courseiva
Storage Management →mediumMultiple Choice

LFCS Storage Management Practice Question

A Linux server uses LVM. The volume group vg_data has 10 GB of free extents. The logical volume /dev/vg_data/lv_app is 20 GB and must be increased by 5 GB while it is mounted and actively used by an application. Which command sequence correctly extends the logical volume and then grows the ext4 filesystem online?

⚠ Common exam trap

Watch out — candidates often confuse filesystem-specific growth tools, such as xfs_growfs for XFS, with resize2fs for ext4.

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

✓

lvextend -L +5G /dev/vg_data/lv_app && resize2fs /dev/vg_data/lv_app

To extend an ext4 filesystem on LVM online, you first increase the logical volume with lvextend, then expand the filesystem with resize2fs. ext4 supports online growth, so the application can continue running. Using xfs_growfs on ext4 or running a filesystem check instead of resize2fs will not achieve the desired result.

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 +5G /dev/vg_data/lv_app && xfs_growfs /dev/vg_data/lv_app

    Why it's wrong here

    xfs_growfs is only for XFS filesystems, but the scenario specifies ext4. Using xfs_growfs on an ext4 filesystem will fail because it cannot interpret ext4 metadata. The logical volume would be extended, but the filesystem would not grow, leaving unused space in the LV.

  • ✓

    lvextend -L +5G /dev/vg_data/lv_app && resize2fs /dev/vg_data/lv_app

    Why this is correct

    lvextend -L +5G adds 5 GB to the logical volume, and resize2fs then expands the ext4 filesystem to use the new space. Because ext4 supports online resizing, this sequence works while the filesystem is mounted. This is the standard, safe method to grow both the LV and the filesystem without unmounting.

  • ✗

    lvresize -L +5G /dev/vg_data/lv_app && resize2fs /dev/vg_data/lv_app

    Why it's wrong here

    lvresize can also extend a logical volume, but the -L +5G syntax is valid only if the volume group has enough free extents. The command itself is not wrong, but lvextend is the more common and recommended tool for extending. However, the critical error is that resize2fs must be run on the device path, which it is, so this option is technically plausible but less standard than lvextend. It is not the best answer because lvextend is the canonical command for this task.

  • ✗

    lvextend -L 25G /dev/vg_data/lv_app && e2fsck -f /dev/vg_data/lv_app

    Why it's wrong here

    lvextend -L 25G sets the absolute size to 25 GB, which is correct for adding 5 GB to a 20 GB LV, but e2fsck does not grow the filesystem. e2fsck is a filesystem checker, not a resizing tool. This sequence would extend the LV but leave the ext4 filesystem at its original size, wasting the new space.

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 →

How Courseiva writes practice questions · Editorial policy

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.