CompTIA Linux+ (XK0-004) — Question 96
An administrator is tasked with increasing the size of the volume /dev/vg/lv to 20GB. Which of the following BEST illustrates the steps the administrator should take?
Answer options
- A. vgextend ג€"L20G /dev/vg/lv; resizelv /dev/vg/lv
- B. parted ג€"L20G /dev/vg/lv; remount /dev/vg/lv
- C. mkfs ג€"L20G /dev/vg/lv; tune2fs /dev/vg/lv
- D. lvextend ג€"L20G /dev/vg/lv; resize2fs /dev/vg/lv
Correct answer: D
Explanation
The correct answer is D because 'lvextend' is the command used to increase the size of a logical volume, and 'resize2fs' is used to resize the filesystem to occupy the new size. Option A is incorrect because 'vgextend' is for adding physical volumes to a volume group, not for resizing. Options B and C are incorrect as they involve commands that do not pertain to resizing logical volumes or filesystems correctly.