You have hot-added a new 4 GiB disk that appears as /dev/sdb to a running server. The existing volume group vgdata contains the logical volume lvhome, which is mounted on /home and formatted with ext4. You must add all of the new disk space to /home without unmounting the file system or rebooting the system. Which ordered sequence of commands accomplishes the task (each command is run as shown, in the order listed)?
To make the new disk usable by LVM you first initialize it with pvcreate. Next you add the resulting physical volume to the existing volume group with vgextend. After the volume group has free extents, you increase the size of the logical volume (here using 100 % of the newly free extents) with lvextend. Because the file system is ext4, it can be grown online, so the final step is to run resize2fs on the logical volume to expand the file system to the new size. Running resize2fs before lvextend, omitting vgextend, or attempting to add the disk to the VG before pvcreate will all fail, so only the listed correct sequence works.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does pvcreate do in the LVM setup?
Open an interactive chat with Bash
Why is vgextend used after pvcreate?
Open an interactive chat with Bash
What is the role of resize2fs in extending ext4 file systems?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access