Which command would you use to extend a logical volume by 5G?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command would you use to extend a logical volume by 5G?

Explanation:
Extending a logical volume is done with the lvextend command, using the -L option with a plus sign to indicate an increase. The correct command increases the specific logical volume battlestar/galactica by 5G, which means the LV's size becomes its previous size plus 5 gigabytes. This directly targets the LV path inside the battlestar volume group and is the standard way to grow a logical volume. The other options don’t fit because one omits the logical volume name (you must specify the LV, not just the volume group), another tries to extend the entire volume group rather than a single LV, and the remaining alternative uses a different utility (lvresize) which, while capable of resizing LVs, isn’t the example shown for this exact scenario. After extending the LV, remember to resize the filesystem inside it to use the new space (for example, xfs_growfs for XFS or resize2fs for ext4).

Extending a logical volume is done with the lvextend command, using the -L option with a plus sign to indicate an increase. The correct command increases the specific logical volume battlestar/galactica by 5G, which means the LV's size becomes its previous size plus 5 gigabytes. This directly targets the LV path inside the battlestar volume group and is the standard way to grow a logical volume.

The other options don’t fit because one omits the logical volume name (you must specify the LV, not just the volume group), another tries to extend the entire volume group rather than a single LV, and the remaining alternative uses a different utility (lvresize) which, while capable of resizing LVs, isn’t the example shown for this exact scenario. After extending the LV, remember to resize the filesystem inside it to use the new space (for example, xfs_growfs for XFS or resize2fs for ext4).

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy