Courseiva

LPIC-1 Devices, Filesystems and FHS Practice Question

Exhibit

Exhibit: Output of `df -h`
Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root              20G   18G  1.1G  95% /
/dev/sda1                               487M  112M  348M  25% /boot
tmpfs                                   1.9G     0  1.9G   0% /dev/shm
/dev/mapper/vg_data-lv_data              50G   30G   18G  63% /data

Refer to the exhibit. The root filesystem is nearly full. The administrator needs to increase its size. Which steps should be performed?

⚠ Common exam trap

Many exam-takers assume the root filesystem is on a traditional partition and attempt to resize it with fdisk or parted, failing to recognize that LVM requires a different workflow with lvextend and resize2fs.

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 lvextend to extend the logical volume and then resize2fs to resize the filesystem

The root filesystem is on an LVM logical volume, as indicated by the exhibit (e.g., /dev/mapper/rootvg-rootlv). To increase its size, you must first extend the logical volume using lvextend, then resize the filesystem with resize2fs. This two-step process ensures the underlying block device and the filesystem are both enlarged to utilize the newly available space.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use parted to resize the root partition and then mount it

    Why it's wrong here

    Resizing the partition with parted does not grow the filesystem itself, and remounting does not resize it; resize2fs must run afterwards. It is tempting because parted is the correct tool for manipulating the partition table when extending a partition into adjacent unallocated space.

  • ✗

    Use fdisk to increase the size of /dev/sda1 and then run resize2fs

    Why it's wrong here

    fdisk writes the partition table but does not inform the running kernel of the new size, so resize2fs would still see the old block device size; partprobe or a reboot is required first. It is tempting because fdisk plus resize2fs is the correct sequence for growing a partition on a disk with free space.

  • ✓

    Use lvextend to extend the logical volume and then resize2fs to resize the filesystem

    Why this is correct

    lvextend grows the logical volume using free space in its volume group, then resize2fs expands the ext4 filesystem online to occupy that new space. Both steps are required because enlarging the LV alone leaves the filesystem unchanged.

  • ✗

    Create a new filesystem on /dev/sda2 and mount it to /

    Why it's wrong here

    Creating a fresh filesystem on /dev/sda2 and mounting it at / would discard the existing root data and cannot extend the current filesystem in place. It is tempting because adding a separate partition is the correct approach when you need extra storage mounted at a new mount point, such as /data.

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.