CompTIA Linux+ (XK0-006)TroubleshootingMedium
An administrator adds a new physical volume to a volume group and extends the logical volume for /home with `lvextend -L +10G /dev/vgdata/lvhome`. The /home filesystem uses XFS. After running the command, `df -h` still shows the old, smaller size for /home. What step was missed?
- ARun `resize2fs /dev/vgdata/lvhome` to grow the filesystem
- BRun `vgextend` again to add the same physical volume a second time
- CReboot the server so the kernel re-reads the partition table
- DRun `xfs_growfs /home` to grow the XFS filesystem to match the new LV size
Show answer & explanationAnswer & explanation
Correct answer: D. Run `xfs_growfs /home` to grow the XFS filesystem to match the new LV size
lvextend only grows the logical volume; the filesystem itself must be separately resized to use the new space. Since /home is XFS, the correct tool is xfs_growfs (resize2fs only works on ext2/3/4 filesystems), and it can be run online without unmounting.
Why the other options are wrong
- A. resize2fs only works on ext2/3/4 filesystems, not XFS.
- B. Running vgextend again on the same PV would fail or have no effect; it doesn't resize the filesystem.
- C. A reboot is unnecessary for LVM/filesystem resizing and won't grow the filesystem.
LVM + Filesystem Resize
Extending an LVM logical volume with lvextend does not automatically grow the filesystem; you must also resize the filesystem using the correct tool for its type.
- ext2/3/4: use resize2fs
- XFS: use xfs_growfs (can only grow, never shrink)
- Combine both steps with lvextend -r to resize automatically
Memory trick: Bigger box (LV) still needs bigger shelves (filesystem) — match the tool to the filesystem type