EX200 Deploy, configure, and maintain systems Practice Question
A Red Hat Enterprise Linux 9 system has a logical volume 'lv_data' in the volume group 'vg_data' that needs to be resized from 10G to 15G. The underlying physical volumes have enough free space. Which sequence of commands correctly resizes the logical volume and the ext4 filesystem?
⚠ Common exam trap
It's easy for candidates to confuse the filesystem-specific resize commands, mistakenly using `xfs_growfs` for ext4 (option C) or reversing the order of operations (option B), failing to recognize that LVM resizing must precede filesystem resizing.
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 15G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
To resize an ext4 filesystem on a logical volume, you must first extend the logical volume with `lvextend -L 15G /dev/vg_data/lv_data` to allocate the additional 5G from the volume group, then use `resize2fs /dev/vg_data/lv_data` to grow the filesystem to fill the enlarged block device. This order ensures the underlying block device has sufficient capacity before the filesystem resize operation.
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 15G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
Why this is correct
lvextend -L 15G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data — This is the correct order. lvextend first expands the logical volume by adding physical extents from the volume group, making a larger block device available to the filesystem. Only after that can resize2fs safely grow the ext4 filesystem into the newly available space; attempting filesystem growth first would have no extra capacity to claim.
- ✗
resize2fs /dev/vg_data/lv_data; lvextend -L 15G /dev/vg_data/lv_data
Why it's wrong here
resize2fs /dev/vg_data/lv_data; lvextend -L 15G /dev/vg_data/lv_data — Running resize2fs before lvextend attempts to grow the filesystem while the underlying logical volume still has its original size. The kernel block device size has not changed, so resize2fs will either report there is no space at the end of the device or fail to expand to the requested size. The filesystem must always be resized after the device layer is enlarged, not before.
- ✗
lvextend -L 15G /dev/vg_data/lv_data; xfs_growfs /dev/vg_data/lv_data
Why it's wrong here
lvextend -L 15G /dev/vg_data/lv_data; xfs_growfs /dev/vg_data/lv_data — Although the lvextend step is correct for growing the LV, xfs_growfs is the wrong tool because it is designed for XFS filesystems, not ext4. On RHEL 9, ext4 requires resize2fs to update its block group descriptors and superblock, whereas xfs_growfs manages XFS-specific allocation group structures and normally takes a mount point argument. Pointing xfs_growfs at an ext4 device will simply fail or have no effect.
- ✗
lvreduce -L 15G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data
Why it's wrong here
lvreduce -L 15G /dev/vg_data/lv_data; resize2fs /dev/vg_data/lv_data — This does the opposite of what is requested: lvreduce shrinks the logical volume to 15G instead of extending it to 15G. Shrinking an ext4 LV without first reducing the filesystem is dangerous and likely to corrupt data, though in this scenario the desired action is growth. The correct direction is to expand the LV first, then grow the filesystem to match.
Go deeper
Related to this question
About these practice questions
One of 427 original EX200 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 →
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.