EX200 Configure local storage Practice Question
Exhibit
Refer to the exhibit. # df -h /data Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg01-data 100G 99G 1.0G 99% /data # cat /etc/fstab /dev/mapper/vg01-data /data xfs defaults 0 0 # lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 150G 0 disk └─sdb1 8:17 0 150G 0 part └─vg01-data 253:1 0 100G 0 lvm /data # vgs VG #PV #LV #SN Attr VSize VFree vg01 1 1 0 wz--n- 150.00g 50.00g
The /data filesystem is at 99% capacity. The LVM setup shows that the volume group has 50GB free space, but the logical volume is only 100GB. What is the correct sequence of commands to increase the filesystem to use all available space in the volume group?
⚠ Common exam trap
Watch out — candidates often confuse the `-L` syntax (absolute vs. relative size) and mistakenly use `resize2fs` for XFS, or reverse the order of commands.
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 +50G /dev/mapper/vg01-data && xfs_growfs /data
The volume group has 50GB free space, so you need to extend the logical volume by +50GB (not to 50GB) using `lvextend -L +50G`, and then grow the XFS filesystem with `xfs_growfs /data` (the mount point, not the block device). The `+` sign indicates an addition to the current size, while omitting it would set an absolute size.
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 50G /dev/mapper/vg01-data && xfs_growfs /dev/mapper/vg01-data
Why it's wrong here
The command uses `-L 50G` without the `+` prefix, which sets the logical volume to exactly 50G rather than increasing it by 50G. If the current LV is larger than 50G, lvextend will attempt to shrink it, which lvextend does not support and will likely fail. Additionally, `xfs_growfs` expects the mount point (e.g., `/data`) as its argument; passing the device mapper path (`/dev/mapper/vg01-data`) is not the standard usage and may fail to locate the correct mount.
- ✓
lvextend -L +50G /dev/mapper/vg01-data && xfs_growfs /data
Why this is correct
This is correct because `lvextend -L +50G` explicitly adds 50G of space to the existing logical volume, expanding the LV to accommodate more data. After the LV is enlarged, `xfs_growfs /data` is executed against the mount point, which is the proper way to grow an XFS filesystem online. `xfs_growfs` automatically expands the filesystem to fill the entire LV, so no size argument is required, and the order is correct because the filesystem can only be grown after the underlying block device has been extended.
- ✗
lvextend -L +50G /dev/mapper/vg01-data && resize2fs /dev/mapper/vg01-data
Why it's wrong here
Although `lvextend -L +50G` correctly extends the logical volume by 50G, the following command `resize2fs` is the wrong tool for an XFS filesystem. `resize2fs` is designed for ext2, ext3, and ext4 filesystems; it will fail with an error such as 'superblock magic number mismatch' when run against XFS. For XFS, the correct utility is `xfs_growfs`, and it must be pointed at the mount point, not the volume device.
- ✗
xfs_growfs /dev/mapper/vg01-data && lvextend -L +50G /dev/mapper/vg01-data
Why it's wrong here
This option inverts the required sequence: the filesystem cannot be grown before the underlying logical volume has been extended. When `xfs_growfs /dev/mapper/vg01-data` runs first, the LV has not yet changed size, so the filesystem still sees the old capacity and has no new space to expand into—it may report that the filesystem is already at its maximum size. Only after `lvextend -L +50G` has successfully increased the LV should you run `xfs_growfs` to extend the filesystem to utilize the newly added 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.