EX200 Create and configure file systems Practice Question
A system administrator needs to extend an existing logical volume 'lv_data' in volume group 'vg_data'. The administrator has already added a new physical volume /dev/sdd1 to the volume group. Which sequence of commands should be used to complete the extension and ensure the filesystem is usable?
⚠ Common exam trap
Many exam-takers think they need to remount the filesystem (Option A) or recreate it (Option C) after extending the logical volume, but in Red Hat Enterprise Linux, `resize2fs` can grow an ext4 filesystem online without 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
✓
lvextend -L +10G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
After adding a physical volume to the volume group, the logical volume must be extended with `lvextend`, and then the filesystem must be resized with `resize2fs` to use the new space. The filesystem remains mounted and usable throughout; no remount or filesystem recreation is needed.
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 +10G /dev/vg_data/lv_data; mount /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
Why it's wrong here
The lvextend command grows the logical volume's block device, but the filesystem still needs resize2fs to use the extra space. Running mount on the logical volume is redundant if the filesystem is already mounted; if it is unmounted, resize2fs can still be run directly on the block device. Attempting to mount an already-mounted LV can produce a 'device is busy' error or shift the active mount, so the mount step should be omitted.
- ✓
lvextend -L +10G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
Why this is correct
This is the correct procedure: lvextend -L +10G first expands the LV by 10 GiB, making additional physical extents available to the LV. Then resize2fs grows the ext4 filesystem to fill the enlarged block device, either online or offline, without unmounting. Because both commands operate in place and preserve the existing data, this safely completes the extension.
- ✗
lvextend -L +10G /dev/vg_data/lv_data; mkfs.ext4 /dev/vg_data/lv_data
Why it's wrong here
Running mkfs.ext4 on the logical volume will recreate an empty ext4 filesystem, erasing all existing data, metadata, directories, and file contents stored in the LV. The lvextend only changes the block device size; it does not reformat the filesystem. After extending, the correct step is resize2fs to grow the existing filesystem while preserving data, not replace it with a new filesystem.
- ✗
lvresize -L +10G /dev/vg_data/lv_data; fsck /dev/vg_data/lv_data
Why it's wrong here
lvresize -L +10G achieves the same size increase as lvextend, but fsck is the filesystem integrity checker and does not change the filesystem size. After growing the LV, you must run resize2fs to expand the ext filesystem into the newly added space. Furthermore, running fsck on an active or mounted filesystem is unsafe and may cause corruption, so this pair does not complete the extension requirement.
- ✗
vgextend vg_data /dev/sdd1; lvextend -L +10G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
Why it's wrong here
vgextend vg_data /dev/sdd1 would add /dev/sdd1 as a new physical volume to the volume group, but this is only necessary when vg_data lacks sufficient free extents. The question states the LV is already in an existing volume group with enough free space, so vgextend is an unnecessary and potentially harmful extra step (the device may not be a dedicated PV). The required actions are simply lvextend to allocate more extents from the existing VG free pool and then resize2fs to grow the filesystem.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 427-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.