EX200 Create and configure file systems Practice Question
Exhibit
Refer to the exhibit. $ df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vg_root-lv_root xfs 20G 18G 2G 90% / /dev/sda1 xfs 1014M 173M 842M 17% /boot
The root filesystem is at 90% capacity. Which command increases available space without unmounting?
⚠ Common exam trap
Red Hat often tests the distinction between filesystem-specific resizing tools (xfs_growfs vs. resize2fs) and the need to run both the LVM extension and the filesystem grow command; the trap here is that candidates may think `lvextend` alone is sufficient or that `resize2fs` works on all filesystems.
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/mapper/vg_root-lv_root && xfs_growfs /
It first extends the logical volume with `lvextend -L +5G`, then grows the XFS filesystem online with `xfs_growfs /` to utilize the new space without unmounting. This is the proper procedure for XFS filesystems, which require `xfs_growfs` (not `resize2fs`) to expand while mounted.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
fstrim /
Why it's wrong here
fstrim discards unused blocks on thin-provisioned or SSD-backed storage, reclaiming space in the storage array, not within the ext4 filesystem reported by df. It is tempting because it runs online against a mounted filesystem and genuinely frees capacity, but only where discard is supported and blocks are already unused.
- ✓
lvextend -L +5G /dev/mapper/vg_root-lv_root && xfs_growfs /
Why this is correct
Extending the logical volume then growing the XFS filesystem online satisfies the no-unmount constraint, since XFS supports live growth via xfs_growfs on a mounted filesystem. The lvextend command adds 5 GB from the volume group, immediately increasing available space on the root filesystem.
- ✗
resize2fs /dev/mapper/vg_root-lv_root
Why it's wrong here
resize2fs only grows or shrinks an ext4 filesystem to match its block device; it cannot enlarge the underlying logical volume, so free space is unchanged. It is tempting because it is the correct second step after lvextend, and online growth of the filesystem without unmounting is exactly what the scenario needs.
- ✗
lvextend -L +5G /dev/mapper/vg_root-lv_root
Why it's wrong here
lvextend enlarges the logical volume itself but leaves the ext4 filesystem at its original size, so df still reports 90% full. It is tempting because it is the essential first half of online growth and requires no unmount, but it must be followed by resize2fs to extend the filesystem into the new space.
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.