System Management
A 40 GiB logical volume, /dev/vg_data/lv_app, holds an ext4 filesystem mounted at /app and is almost full. The volume group has 25 GiB of free extents. An administrator must add exactly 10 GiB to the volume and grow the mounted filesystem, using a single command and no unmounting. Which command BEST meets this requirement?
Show the answer
Correct answerD. lvextend -r -L +10G /dev/vg_data/lv_app
lvextend with -L +10G adds a relative 10 GiB, and -r (--resizefs) grows the ext4 filesystem in the same step. Without -r, the LV grows but the filesystem stays at its old size until resize2fs is run. lvchange modifies LV attributes and cannot resize.